added validator of the form with changing status of 'ok' button