Added validationto registration