intercept post from form in order to validate