Skip to content

Add chaining methods for numeric values #10

@jonnitto

Description

@jonnitto

Currently, it is only possible with a regex to enable minimal and maximal values for numeric values. It would be great to have a syntax like that, as it is easier to read:

PropTypes.integer.min(1).max(10)
PropTypes.float.min(0).max(1)

Or just one method

PropTypes.float.min(1)
PropTypes.integer.max(10)

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