validation of registration inputs