fixed bug in local validation
added required in model