callFunction static method
Calls the appropriate validator based on type.
Implementation
static String? callFunction(ValidatorType type, String? value) {
switch (type) {
case ValidatorType.email:
return validateEmail(value);
case ValidatorType.password:
return validatePassword(value);
case ValidatorType.name:
return validateName(value);
case ValidatorType.mobile:
return validateMobile(value);
}
}