Update register.php and validation class