Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Validator names #265

@ghost

Description

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:

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.

As I said, very minor, but just a thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions