You are here

public function FieldValidationRuleBase::setErrorMessage in Field Validation 8

Sets the error message for this field_validation_rule.

Parameters

int $error_message: The error message for this field_validation_rule.

Return value

$this

Overrides FieldValidationRuleInterface::setErrorMessage

File

src/FieldValidationRuleBase.php, line 273

Class

FieldValidationRuleBase
Provides a base class for FieldValidationRule.

Namespace

Drupal\field_validation

Code

public function setErrorMessage($error_message) {
  $this->error_message = $error_message;
  return $this;
}