Open Vineet060 opened 4 months ago
This is not a bug, most users want to use customValidate
to enhance the validator rather than replace it.
You could stub transformErrors
to remove all of the errors provided by the validator. It looks like it runs before customValidate
, so just return an empty array of errors in transformErrors
and the validator errors should be removed.
For your case, I would just make transformErrors
look something like this:
function transformErrors(errors, uiSchema) {
// Remove all errors reported by the validator
return []
}
Prerequisites
What theme are you using?
antd
Version
5.x
Current Behavior
I'm applying validation with customValidate but in that case default validator props also applying validation and validator is required props.
So cause of this i'm seeing two validation message one is coming from validator and second is coming from custom validator.
Expected Behavior
Default validator should not work if i'm using custom validation.
Steps To Reproduce
No response
Environment
Anything else?
No response