shity implementation of modal form validation