I have restricted the username to numerical format but not able to integrate the same with PeepSo plugin

@MarkKaplun i have figured it out with some experiment and got success in it (i have to re-install everything like 3 times). i would really appreciate if you can guide me weather i have taken the right path or not.

Here is what i did:

following is the file path in my plugin directory – /wp-content/plugins/peepso-core/classes
there are two file and both need edits.

Step 1. file name is formvalidate.php , i don’t know the row no but there was written:

‘username’ => __(‘This field only accepts alpha, numbers, dashes and undersocre’, ‘peepso-core’)

so i changed this row into:

‘username’ => __(‘This field only accepts numbers’, ‘peepso-core’),

Step 2. file name is register.php , in this file i had this code:

‘username’ => array(
‘label’ => __(‘User Name’, ‘peepso-core’),
‘descript’ => __(‘Enter your desired User Name’, ‘peepso-core’),
‘value’ => $input->val(‘username’, ”),
‘required’ => 1,
‘validation’ => array(
‘username’,
‘required’,
‘minlen:’ . PeepSoUser::USERNAME_MINLEN,
‘maxlen:’ . PeepSoUser::USERNAME_MAXLEN,
‘custom’
),

i just changed it to following:

‘username’ => array(
‘label’ => __(‘User Name’, ‘peepso-core’),
‘descript’ => __(‘Enter your desired User Name’, ‘peepso-core’),
‘value’ => $input->val(‘username’, ”),
‘required’ => 1,
‘validation’ => array(
‘numeric’,
‘required’,
‘minlen:’ . PeepSoUser::USERNAME_MINLEN,
‘maxlen:’ . PeepSoUser::USERNAME_MAXLEN,
‘custom’
),

that’s it and i am able to achieve where a person can signup with numeric ID only in PeepSo Plugin.

also to do a new experiment i have changed the minimum length of user id to 10 so that anyone can create username in numaric and it can be a mobile no.
i have done following to change the minimum length :

file name – user.php just changed the

const USERNAME_MINLEN = 2; to const USERNAME_MINLEN = 10;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)