I am trying to restrict a certain combination of characters in a user name while they register.
I have restricted user names to numeric characters only, but now I am not getting a way out to restrict certain combination & numeric values for user names.
Here is the code I'm using, which enforces numeric only user names:
'username' => array( 'label' => __('Username', 'peepso-core'), 'descript' => __('Numeric Username Only, Best would be Your Mobile Number', 'peepso-core'), 'value' => $input->val('username', ''), 'required' => 1, 'validation' => array( 'numeric', 'required', 'minlen:' . PeepSoUser::USERNAME_MINLEN, 'maxlen:' . PeepSoUser::USERNAME_MAXLEN, 'custom' ),
Please suggest what can be done.