getValidatorMessage method

String? getValidatorMessage(
  1. String rule
)

Get a validation message for a specific validation rule.

The getValidatorMessage function is used to retrieve a validation message associated with a specific validation rule. It looks up the rule in the validationMessage map and returns the corresponding message as a string. If the rule is not found, it returns null.

Parameters:

  • rule: The name or identifier of the validation rule for which you want to retrieve the validation message.

Returns: A list of FormifyRule objects representing the validation rules for the specified form attribute, or an empty list [] if the attribute is not found.

Implementation

String? getValidatorMessage(String rule) {
  return validationMessage[rule];
}