I'm trying to validate the form users submit when updating their profile data. I've hooked into user_profile_update_errors. It prints errors correctly to the user, however, it still allows the errors to be applied to the User's profile. The errors displayed are not actually enforced.
How can I prevent erred profile entries from being saved and instead block them?
Thanks
function tml_profile_errors( $errors ) {
if ( empty( $_POST['state'] ) )
$errors->add( 'empty_missing_', '<strong>ERROR</strong>: Please enter your state.' );
return $errors;
}
add_filter( 'user_profile_update_errors', 'tml_profile_errors' );