added validation to model
Merge pull request #2 from marekpwk/models

added validation to model