Skip to content

Commit

Permalink
Add format example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
esbanarango committed May 18, 2015
1 parent d815795 commit 3808bd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default DS.Model.extend(Validator,{
name: DS.attr('string'),
email: DS.attr('string'),

legacyCode: DS.attr('string'),
lotteryNumber: DS.attr('number'),

otherFakes: DS.hasMany('other-model'),
Expand All @@ -38,6 +39,9 @@ export default DS.Model.extend(Validator,{
presence: true,
email: true
},
legacyCode:{
format: {with: /^[a-zA-Z]+$/}
},
lotteryNumber: {
numericality: true
},
Expand Down

0 comments on commit 3808bd2

Please sign in to comment.