Class Index | File Index

## Classes

- _global_
- M
- M.ActionSheetDialogView
- M.AlertDialogView
- M.Application
- M.Base64
- M.ButtonGroupView
- M.ButtonView
- M.ConfirmDialogView
- M.ContainerView
- M.Controller
- M.Cypher
- M.DataProvider
- M.Date
- M.DateValidator
- M.EmailValidator
- M.Environment
- M.EventDispatcher
- M.FormView
- M.GridView
- M.I18N
- M.ImageView
- M.LabelView
- M.ListItemView
- M.ListView
- M.LoaderView
- M.LocalStorageProvider
- M.Logger
- M.Math
- M.Model
- M.ModelAttribute
- M.ModelRegistry
- M.NotMinusValidator
- M.NumberValidator
- M.Object
- M.Observable
- M.PageView
- M.PhoneValidator
- M.PresenceValidator
- M.RecordManager
- M.RemoteStorageProvider
- M.Request
- M.ScrollView
- M.SearchBarView
- M.SelectionListItemView
- M.SelectionListView
- M.SHA256
- M.TabBarItemView
- M.TabBarView
- M.TextFieldView
- M.ToggleView
- M.ToolbarView
- M.UrlValidator
- M.Validator
- M.View
- M.ViewManager
- M.WebSqlProvider

# Class M.Validator

Extends M.Object.
The prototype for every validator. All validation logic is implemented in the specific validators.
Defined in: validator.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| M.Validator()

Field Summary
Field Attributes | Field Name and Description
--- | ---
| type The type of this object.
| validationErrors "Class-wide" array containing error objects.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| clearErrorBuffer() Empties the error buffer, is done before each new validation process
| customize(obj) extends this.

Methods borrowed from class M.Object:
  bindToCaller, create, destroy, extend, get, include, set

Class Detail
M.Validator()
Field Detail
{String} type
The type of this object.

{Array|Object} validationErrors
"Class-wide" array containing error objects. Specific validators do NOT have an own validationErrors array, but use this one to write errors to. Error object represent errors that occured during validation. E.g. error object: { msg: 'E-Mail adress not valid.', modelId: 'Task_123', property: 'email', viewId: 'm_123', validator: 'EMAIL', onSuccess: function(){proceed();} onError: function(markTextFieldError(); console.log('email not valid')}; }
Method Detail
clearErrorBuffer()
Empties the error buffer, is done before each new validation process

{Object} customize(obj)
extends this. Can be used to provide a custom error msg to a validator E.g. M.EmailValidator.customize({msg: 'Please provide a valid e-mail adress.'});

Parameters:
obj

Returns:
  {Object} The customized validator.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 08 2010 15:07:35 GMT+0100 (MEZ)