added more detailed form validation with custom apply and unapply methods2