New DSL to define validations + Numericality
Before:
validations: {
presence: ['name','email'],
email: ['email'],
relations: {
hasMany:['otherFakes']
}
}
Now:
validations: {
name: {
presence: true
},
email: {
presence: true,
email: true
},
lotteryNumber: {
numericality: true
},
otherFakes:{
relations: ['hasMany']
}
}