Class nnjl.mvc.workdata.WorkData
Defined in: nnjl.mvc.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new WorkData object
|
| Method Attributes | Method Name and Description |
|---|---|
|
addError(error, field)
Add an error to workdata
|
|
|
addErrors(otherErrors)
Add a map of errors to the workdata errors.
|
|
|
getHTMLFieldErrors(fieldName)
get the HTML code to display field errors, if no errors return ""
|
|
|
Get the HTML code to display form errors, if no errors return ""
|
|
Method Detail
addError(error, field)
Add an error to workdata
- Parameters:
- {string} error
- Error Message
- {string} field Optional
- Field associated to the error.
addErrors(otherErrors)
Add a map of errors to the workdata errors.
- Parameters:
- {Hash} otherErrors
{string}
getHTMLFieldErrors(fieldName)
get the HTML code to display field errors, if no errors return ""
- Parameters:
- {string} fieldName
- Returns:
- {string} HTML with field error
{string}
getHTMLHeaderErrors()
Get the HTML code to display form errors, if no errors return ""
- Returns:
- {string} HTML with all form header errors
{boolean}
hasErrors()
- Returns:
- {boolean} return true if the workdata has error after validation