Skip to content

Commit

Permalink
Develop 484 (#513)
Browse files Browse the repository at this point in the history
* fix regex - escape the - charcter

* add back quantifier to start of regex
  • Loading branch information
beckpaul authored Dec 2, 2023
1 parent 82aeb42 commit d231e86
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/backend/templates/mixins/form/account.pug
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
mixin email
p Enter your Email
p Enter your Email
.formStart
input(type='email', name='email', required='required', placeholder='[email protected]', value=formData['email'])
span(aria-hidden='true')
span(aria-hidden='true')



mixin username
p Enter your username
.formStart
//value=formData['username']
input(type='text', name='username', required='required', data-minlength='3', maxlength='16', pattern='[A-Za-z]{1}[A-Za-z0-9_-]{2,15}$', data-minlength-error='The username is too short - must be at least 3 characters', data-error='Please check username requirements', data-remote="/account/checkUsername", data-remote-error="Username taken", placeholder='Eco_Player7-', value=formData['username'])
input(type='text', name='username', required='required', data-minlength='3', maxlength='16', pattern='^[A-Za-z]{1}[A-Za-z0-9_\\-]{2,15}$', data-minlength-error='The username is too short - must be at least 3 characters', data-error='Please check username requirements', data-remote="/account/checkUsername", data-remote-error="Username taken", placeholder='Eco_Player7-', value=formData['username'])
span(aria-hidden='true')
.formHelp
.formHelp
ul Your username must:
li Start with a letter

li Be between 3 and 16 characters

li Only use letters and digits ( - and _ are allowed).


Expand Down

0 comments on commit d231e86

Please sign in to comment.