adding error validation on form