added validation to modal form