Class: module:crm/Validator

module:crm/Validator()

Validators for use in argos.Edit forms. To use validators, you add them to your view's layout:

Constructor

new module:crm/Validator()

Source:
Example
createLayout: function() {
          return this.layout || (this.layout = [{
                  label: this.accountText,
                  name: 'AccountName',
                  property: 'AccountName',
                  type: 'text',
                  validator: validator.notEmpty
              }, {
                  label: this.webText,
                  name: 'WebAddress',
                  property: 'WebAddress',
                  renderer: format.link,
                  type: 'text',
                  inputType: 'url',
                  maxTextLength: 128,
                  validator: validator.exceedsMaxTextLength
              }]);
      }

Members

(static) exceedsMaxTextLength

Properties:
Type Description
Object
Source:

(static) exists

Properties:
Name Type Description
exists Object

Validator that ensures the field contains a value.

Source:

(static) hasText

Properties:
Name Type Description
Validator Object

that ensures a field has text. Warning This does not work with unicode.

Deprecated:
  • Yes
Source:

(static) isCurrency

Properties:
Name Type Description
Validator Object

that ensures a field is valid currency.

Source:

(static) isDateInRange

Properties:
Type Description
Object
Source:

(static) isDecimal

Properties:
Name Type Description
Validator Object

that ensures a field is a valid decimal.

Source:

(static) isGreaterThan

Properties:
Type Description
Object
Source:

(static) isInt32

Properties:
Name Type Description
Validator Object

that ensures a field is a valid Int32.

Source:

(static) isInteger

Properties:
Name Type Description
Validator Object

that ensures a field is a valid number.

Source:

(static) isLessThan

Properties:
Type Description
Object
Source:

(static) isPhoneNumber

Properties:
Type Description
Object
Deprecated:
  • Yes
Source:

(static) name

Properties:
Name Type Description
name Object

Validator that ensures a FirstName and LastName property have been specified.

Source:

(static) notEmpty

Properties:
Name Type Description
Validator Object

that ensures a field is not empty.

Source: