Class nnjl.forms.FormMetadata
Defined in: nnjl.forms.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
nnjl.forms.FormMetadata(from)
Creates a new FormMetadata
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
nnjl.forms.FormMetadata.get(field)
get the value of one field
|
| <static> |
nnjl.forms.FormMetadata.getErrorMap()
get errors by field in a hash
|
| <static> |
nnjl.forms.FormMetadata.getErrors()
get errors messages of form
|
| <static> |
nnjl.forms.FormMetadata.getFieldErrors(fieldName)
get errors of on field
|
| <static> |
nnjl.forms.FormMetadata.getHeaderErrors()
get header errors of the form
|
| <static> |
nnjl.forms.FormMetadata.hasErrors()
|
| <static> |
nnjl.forms.FormMetadata.set(field, value)
Set the value for the specified field
|
| <static> |
nnjl.forms.FormMetadata.validate()
Validate all the rules of the form
|
Class Detail
nnjl.forms.FormMetadata(from)
Creates a new FormMetadata
- Parameters:
- {nnjl.forms.FormMetadata} from
- metadata
Method Detail
<static>
nnjl.forms.FormMetadata.get(field)
get the value of one field
- Parameters:
- field
- Returns:
- value of the field
<static>
{Hash}
nnjl.forms.FormMetadata.getErrorMap()
get errors by field in a hash
- Returns:
- {Hash
} all form errors
<static>
{string[]}
nnjl.forms.FormMetadata.getErrors()
get errors messages of form
- Returns:
- {string[]} all form errors message
<static>
{string[]}
nnjl.forms.FormMetadata.getFieldErrors(fieldName)
get errors of on field
- Parameters:
- {string} fieldName
- Returns:
- {string[]} all field errors
<static>
{string[]}
nnjl.forms.FormMetadata.getHeaderErrors()
get header errors of the form
- Returns:
- {string[]} all form header errors
<static>
{boolean}
nnjl.forms.FormMetadata.hasErrors()
- Returns:
- {boolean} return true if the form has error after validation
<static>
nnjl.forms.FormMetadata.set(field, value)
Set the value for the specified field
- Parameters:
- field
- value
<static>
{boolean}
nnjl.forms.FormMetadata.validate()
Validate all the rules of the form
- Returns:
- {boolean} true if there are errors on the form, false if there is no errors.