ModuleLayoutRule
Extends FormRuleForm Rule class for the Joomla Platform.
since |
3.9.26 |
---|---|
package |
Joomla CMS |
Methods
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.6 |
---|---|
throws |
|
Arguments
- element
SimpleXMLElement
The SimpleXMLElement object representing the<field>
tag for the form field object.- value
mixed
The form field value to validate.- group
string
The field name group control value. This acts as 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|null
An optional Registry object with the entire data set to validate against the entire form.- form
Form|null
The form object for which the field is being tested.
Response
bool
True if the value is valid, false otherwise.
Properties
regex
The regular expression to use in testing a module layout field value.
A valid module layout field value consists of
- optionally a template name with only characters, numbers, hyphens and underscores, which can also be just "_" for layouts provided by the module, followed by a colon.
- the base name of the layout file, not starting with a dot and with only characters, numbers, dots and hyphens but no underscores (see method "getInput" of the "ModuleLayout" field).
since |
3.9.26 |
---|
Type(s)
string
modifiers
The regular expression modifiers to use when testing a form field value.
since |
1.6 |
---|
Type(s)
string