Redux Form validation examples only include individual field validations.
Having a list of a certain number of fields that are the same, how can I model a validation that requires at least one of the inputs to be a valid email address?
For example, for the given form made up of the following fields:
How can I write a validation function that requires Special User 4 to always be set, and either one of the first 3 users?
Your synchronous validation function is given all the values of the form. Your errors must correspond to a field key, or you can use the generic _error
key, which will result in this.props.error
being populated.
Does that make sense?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With