async-validator
async-validator copied to clipboard
Ability To Validate Against Multiple Types
I am using AntD's forms to validate some user inputs and I am running into a case where I want to validate against multiple types for a single rule, akin to the behaviour described in async-validate.
It would be nice to be able to define rules in a manner akin to:
rules: [
{
type: ['integer', 'number']
message: 'Not a number.'
},
{
type: ['integer']
message: 'Not an integer.'
}
]
I'm looking forward to it.
looking forward for this union validation options