Codex tools: Log in
Contents |
Checks whether username is valid.
<?php validate_username( $username ) ?>
<?php
if (validate_username( $_POST['username'] )) {
// Go ahead and save the user...
}
?>
Since: 2.0.1
Before 3.0
validate_username() is located in wp-includes/registration.php.
After 3.0
validate_username() is located in wp-includes/user.php.