validate method
Implementation
String? validate() {
if (error != null) {
return error;
}
if (isRequired) {
if (_value == null) {
return "Field $name is required";
}
}
return null;
}
String? validate() {
if (error != null) {
return error;
}
if (isRequired) {
if (_value == null) {
return "Field $name is required";
}
}
return null;
}