Solar_Form::addInvalid()

public void Solar_Form::addInvalid ( string $name , string|array $spec , string $array = NULL )

Adds one or more invalid message to an element, sets the element status to false (invalid), and sets the form status to false (invalid); if the element does not exist, adds the message as form-level feedback.

Parameters

  • (string) $name: The element name.

  • (string|array) $spec: The invalidation message(s).

  • (string) $array: Rename each element as a key in this array.

Returns

  • (void)

Description

Adds one or more invalid message to an element, sets the element status to false (invalid), and sets the form status to false (invalid); if the element does not exist, adds the message as form-level feedback.



Local