You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
import { string } from @dhis2/prop-types
import { string } from @dhis2/ui-forms
I'm currently aliasing the ui-forms imports to isString, isBoolean, etc, on import. Since we already have hasValue there, I wouldn't find it weird to use that naming scheme for all validators. We could add them as aliases, and drop the original ones in the next major version.
Minor thing, but personally I like to destructure my prop-types, and those names conflict with the validator names exported by this lib:
https://github.com/dhis2/ui-forms/blob/master/src/validators/index.js#L1-L20
So say you have this:
I'm currently aliasing the ui-forms imports to
isString,isBoolean, etc, on import. Since we already havehasValuethere, I wouldn't find it weird to use that naming scheme for all validators. We could add them as aliases, and drop the original ones in the next major version.As I said, very minor, but just a thought.