mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
Fix alphabetic and lowercase validations
This commit is contained in:
@@ -410,6 +410,27 @@
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'alphabetic':
|
||||
|
||||
if ( $args[$key] != '' ) {
|
||||
|
||||
if( ! ctype_alpha( str_replace(' ', '', $args[$key] ) ) ){
|
||||
$ultimatemember->form->add_error( $key , __('You must provide alphabetic letters','ultimatemember') );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'lowercase':
|
||||
|
||||
if ( $args[$key] != '' ) {
|
||||
|
||||
if( ! ctype_lower( str_replace(' ', '',$args[$key] ) ) ){
|
||||
$ultimatemember->form->add_error( $key , __('You must provide lowercase letters.','ultimatemember') );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user