]{1,18}$/",$username)) { return false; } return true; } public function ValidatePassword(string $password) : bool{ if(strlen($password)>100) { return false; } return true; } }