validatesNumericalityOf

  • function
can.Map.validations.static.validatesNumericalityOf  

observe.validatesNumericalityOf(attrNames)

Validates that the specified attributes is a valid Number.

init : function(){
  this.validatesNumericalityOf(["age"]);
}

Parameters

  1. attrNames {Array | String}

    Attribute name(s) to to validate