RulesRule

Extends FormRule

Form Rule class for the Joomla Platform.

since

1.7.0

package

Joomla CMS

Methods

getFieldActions

Method to get the list of possible permission action names for the form field.

getFieldActions(\SimpleXMLElement element) : string||string|int
since

1.7.0

Arguments

element

SimpleXMLElementThe \SimpleXMLElement object representing the <field> tag for the form field object.

Response

array<string|int, string>A list of permission action names from the form field element definition.

getValueActions

Method to get the list of permission action names from the form field value.

getValueActions( value) : string||string|int
since

1.7.0

Arguments

value

mixedThe form field value to validate.

Response

array<string|int, string>A list of permission action names from the form field value.

test

Method to test the value.

test(\SimpleXMLElement element,  value,  group = null, \Joomla\Registry\Registry input = null, \Joomla\CMS\Form\Form form = null) : 
since

1.7.0

Arguments

element

SimpleXMLElementThe SimpleXMLElement object representing the <field> tag for the form field object.

value

mixedThe form field value to validate.

group

stringThe field name group control value. This acts as an array container for the field. For example if the field has name="foo" and the group value is set to "bar" then the full field name would end up being "bar[foo]".

input

Registry|nullAn optional Registry object with the entire data set to validate against the entire form.

form

Form|nullThe form object for which the field is being tested.

Response

boolTrue if the value is valid, false otherwise.

Properties

regex

The regular expression to use in testing a form field value.

inherited
since

1.6

Type(s)

string

modifiers

The regular expression modifiers to use when testing a form field value.

inherited
since

1.6

Type(s)

string