Closed harleenarora closed 3 years ago
Can you explain better what's the exact issue?
As per your implementation, your error message will be visible after a blur event i.e when touched
is true.
Can you put some log in the validator function and check if it is getting called or not?
Check this example https://codesandbox.io/s/p2rqmr8qk7
I think it should be validators
instead of validator
.
changePasswordForm = FormBuilder.group({
new_password: ['', [Validators.required]],
confirm_password: ['', [Validators.required]],
}, {
validators: this.MatchPassword,
});
Closing since no activity. Please feel free to reopen.
I am working on latest react-native version. I'm trying to implement a custom validator to check if the password and password confirm are equal. The problem is that the validator function is not working.
Code::
Please tell me how to do this?