A model definition represents the structure of the data which 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 models using the incoming data, there may be certain rules that we would like to apply to make sure that the model represents 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 by using
Model. There are pre-defined lists of validations, which we can use to setup the ...