Added validation to the registration.
Added Validation to Registration