circuitnederland / registrationform

0 stars 0 forks source link

Improve clientside validations #10

Open sandrab opened 6 years ago

sandrab commented 6 years ago

Improve the clientside javascript validations:

A note about the username validation: In Cyclos the regular expression used for usernames is `^[\w.]$` which means letters, numbers, underscores (\w) and dots (.). This means that the 'alphanumeric' method from the jqueryvalidation library can not be used for the clientside validation in this case, because it only allows letters, numbers and underscores (\w) and no dots. The regex for usernames in Cyclos can be found via Systeem > [Systeemconfiguratie] Configuraties > Default for Nederland: regex voor gebruikersnaam.

sandrab commented 6 years ago

Note: Solve #6 first.

sandrab commented 6 years ago

@rmvanarkel : the GDrive document (7.5 point 6) only asks to allow underscores in usernames. I found out that Cyclos also allows dots. So not only pietje_puk but also pietje.puk is a valid username in Cyclos. Do you agree that the registrationform validation then should allow for both as well?

sandrab commented 6 years ago

Discussed with Roder: allowing dots in username is fine.

sandrab commented 5 years ago

@rmvanarkel For the username field I see validation rules in Cyclos (global administration > System > Configurations > 'Global default'):

Do you know if/where Cyclos also configures the validation rules for the name field? See the second point of this github issue: Cyclos wants the name field to have at least 3 characters. I discovered this by chance, but I can not find this in the Cyclos configuration. I wonder if there are other validation rules for this field - if so, we can let the clientside validation follow the same rules.