added validation rules and messages