Open Vic44tu opened 3 years ago
async
is just a example key (I used it b/c the example also demonstrates how to do async stuff, but it probably made it less clear), it can be any key (such as myCustomAwesomeCode
). IIRC, the key has no special meaning, it just cannot be one of the predefined validation keys.
I would like to use Custom Validation and define error Message. The example given in doc is with async function: validate={{async: this.validate}}
1) is it possible to use custom validate function without async call? 2) is it possible to define simply the errorMessage? I tried (in functional component): validate={{validate: myValidate, errorMessage: "my error msg"}} but myValidate not called validate={{myValidate}} or validate={{validate: myValidate, ...}}; myValidate is called but errorMessage has to be stored and displayed on its own for example with AvFeedback