Adding validation to userDetail