added validation for form