API Docs for: 0.0.2
Show:

form.validator.Md5 Class

Md5 validator for form elements When used, the associated form element will be flagged as invalid if MD5(value) doesn't match value of this validator. If no value is sent to the constructor of form.validator.Md5, it will send a request to the server and ask for it.

Methods

loadValue Request to server example:

()

Loading valid value from server.

Example:

    {
        getValidatorValueFor:'nameOfView',
    }

Response from server example:

{ success:true, data : { value : 'valid value} }

Attributes

object applyTo

Validator is applied to this component

Default: undefined

Fires event object applyToChange

Fires when the value for the configuration attribute object applyTo is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

value

MD5 value to validate against. Component will be valid only when md5(formElement.value) matches this value

Default: undefined

Fires event valueChange

Fires when the value for the configuration attribute value is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

Events

loadValue

Event fired after validator value has been loaded from server

Event Payload:

  • form.validator.Base Object

    this