validatePresenceOf

  • function
can.Map.validations.static.validatePresenceOf  

observe.validatePresenceOf(attrNames, options)

Validates that the specified attributes are not blank.

init : function(){
  this.validatePresenceOf(["name"])
}

Parameters

  1. attrNames {Array<String>}

    Attribute name(s) to to validate

  2. options {Object}Optional

    Options for the validations. Valid options include 'message' and 'testIf'.