A model definition represents the structure of the data that has one or more fields. For example, a payment model containing a
paymentDate field to store the date when the payment was made. Now, when we construct the models using the incoming data, there may be certain rules that we would like to apply to make sure that the model represents a valid data. For example, on a payment model, it may be required to have a
paymentDate field and also it may be required that the value in this field is in the past (prior to today's date). This kind of mechanism helps us to build robust applications.
Sencha Touch provides support for this using the validations on
Model. There are predefined lists of validations that we can use to set ...