Backbone validation examples
Required with Range:
validation: {
"port": {
required: function(value, name, settings)
{
if (settings.mode == "file") return false;
return true;
},
range: [1025, 65535]
msg: "Port must be a valid number between 1025 and 65535."
}
},
Also view Troubleshooting Backbone Validation for more basic usage example.
Recent Comments