register modal now validates input