error<T extends FormFieldState<G> , G> method
Retrieves the error message for a form field by its fieldName.
fieldNameThe name of the field whose error message is to be retrieved.- Returns: The error message of the specified form field, or
nullif no error exists.
Implementation
String? error<T extends FormFieldState<G>, G>(String fieldName) =>
get<T, G>(fieldName).error;