Closed bdairy closed 1 month ago
@bdairy I will add this as a potencial new feature but in the meantime I think you can do something like below:
CustomFormViewModel
Future<void> saveUser() async {
if (hasEmailValidationMessage && hasMobileValidationMessage) return;
// do your task here...
}
@bdairy I will add this as a potencial new feature but in the meantime I think you can do something like below:
CustomFormViewModel
Future<void> saveUser() async { if (hasEmailValidationMessage && hasMobileValidationMessage) return; // do your task here... }
Already created a custom validator function for that form, I appreciate you guys for considering our requests.
Best of luck
Is your feature request related to a problem? Please describe.
I have a form with two optional fields, but the use should fill at least one field,, for example , Email address or Mobile number..
I have email and mobile regex validators,, but the form wont be valid until one value is filled and valid,,
We need a custom form validator.
Describe the solution you would like
My suggestion is to add a validator field to the form.. like this
You can get the idea from the Reactive Forms of angular...
Additional Context
No response