Open jonathan-lph opened 3 years ago
added user name and password validation on the registration page
Rule:
@jonathan-lph Request for an issue close if no problem
Password also [A-Z, a-z, 0-9]? User name can add '_' '-'.
Please also check Rest username. If English name is provided, replace space to '-' as username. If ONLY Chinese name is provided, replace Chinese name space to '-' as username.
if (type == 'Rest')
username = input.username != null
? input.username.replace(/ /g, '-') // English name replace space to -
: input.name.replace(/ /g, '-') // Chinese name replace space to -
Password also [A-Z, a-z, 0-9]? User name can add '_' '-'.
For user name can be letters, digits, - and _ For pw can be letters and digits only
Need to check user's input as valid, e.g. username in [A-Z, a-z, 0-9, -_].