Previous Page
addFilters()

Solar_Form
addInvalid()

Next Page
addInvalids()

addInvalid()

public void addInvalid ( string $name, string|array $spec, string $array default 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).

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).