End of day commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
attr = DS.attr
|
||||
App.Employee= DS.Model.extend Ember.Validations.Mixin,
|
||||
name: attr 'string'
|
||||
email: attr 'string'
|
||||
|
||||
validations:
|
||||
name:
|
||||
presence: true
|
||||
@@ -17,7 +17,7 @@ App.Product = DS.Model.extend
|
||||
image
|
||||
).property('image')
|
||||
|
||||
isValid: (->
|
||||
isValid: (->
|
||||
return false unless price = @get('price')
|
||||
return false unless "#{price}".match(/^[+-]?\d+(\.?\d?\d)?$/)
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user