message method

String message(
  1. String fieldName
)

Retrieves the validation message to be displayed.

  • fieldName: The name or label of the form field being validated.

Returns the custom validation message if provided by the user, otherwise, it falls back to the validator message defined by the subclass.

Implementation

String message(String fieldName) => _message ?? validatorMessage(fieldName);