validating modal form