Class nnjl.forms.rules.FormRule
Defined in: nnjl.forms.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new FormRule
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
nnjl.forms.rules.FormRule.execute(formbean)
validate the rule
|
| <static> |
nnjl.forms.rules.FormRule.getField()
Get the field associated to the rule
|
| <static> |
nnjl.forms.rules.FormRule.getValue()
Get the value associated to the rule
|
| <static> |
nnjl.forms.rules.FormRule.setErrorMessageTemplate(errorMessageTemplate)
set the error message template.
|
| <static> |
nnjl.forms.rules.FormRule.setField(fieldname)
Set the field associated to the rule
|
| <static> |
nnjl.forms.rules.FormRule.setProps(props)
Set properties to config the rule
|
| <static> |
nnjl.forms.rules.FormRule.setValue(value)
Set the value associated to the rule
|
Method Detail
<static>
{boolean}
nnjl.forms.rules.FormRule.execute(formbean)
validate the rule
- Parameters:
- formbean
- Returns:
- {boolean} true if the rule pass the validation method.
<static>
{string}
nnjl.forms.rules.FormRule.getField()
Get the field associated to the rule
- Returns:
- {string} fieldname
<static>
{string}
nnjl.forms.rules.FormRule.getValue()
Get the value associated to the rule
- Returns:
- {string} value
<static>
nnjl.forms.rules.FormRule.setErrorMessageTemplate(errorMessageTemplate)
set the error message template. Template admit variables using sintax #{variable}.$ In the context of
the template there is the formbean.* and rule.*
- Parameters:
- {string} errorMessageTemplate
<static>
nnjl.forms.rules.FormRule.setField(fieldname)
Set the field associated to the rule
- Parameters:
- {string} fieldname
<static>
nnjl.forms.rules.FormRule.setProps(props)
Set properties to config the rule
- Parameters:
- {json} props
<static>
nnjl.forms.rules.FormRule.setValue(value)
Set the value associated to the rule
- Parameters:
- {string} value