Solar_Form::addFilter()

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

Adds one filter to an element.

Parameters

  • (string) $name: The element name.

  • (array|string) $spec: The filter specification; either a Solar_Filter method name (string), or an array where the first element is a method name and remaining elements are parameters to that method.

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

Returns

  • (void)

Description

Adds one filter to an element.

If the added filter is a "validateNotBlank" filter, automatically sets the "require" flag on the element to true.



Local