Skip to content

Commit e437675

Browse files
authored
Merge pull request nerdapplabs#21 from aksinha-nerdapplabs/password_regex_modified
Password regex modified
2 parents d1f549f + 48376bb commit e437675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ApiBundle/Resources/config/validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ApiBundle\Entity\User:
5959
- Regex:
6060
groups: [profile_edit_password, Registration, Profile]
6161
# Password 6-50 characters, at least 1 Uppercase, 1 Lowercase, 1 Number and 1 Special Character other than [ and ]
62-
pattern: '/(?=^.{6,50}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[-_!@#$%&*+=()^{};:.,\\|\/?><"'])(?!.*\s).*$/'
62+
pattern: '/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[-_!@#$%&*+=()^{};:.,\\|\/?><"'])[A-Za-z\d][A-Za-z\d-_!@#$%&*+=()^{};:.,\\|\/?><"']{6,50}$/'
6363
match: true
6464
message: "user.show_error_password_policy"
6565
payload:
@@ -92,7 +92,7 @@ FOS\UserBundle\Form\Model\ChangePassword:
9292
api_error: 'api.show_error_password_policy'
9393
- Regex:
9494
# Password 6-50 characters, at least 1 Uppercase, 1 Lowercase, 1 Number and 1 Special Character other than [ and ]
95-
pattern: '/(?=^.{6,50}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[-_!@#$%&*+=()^{};:.,\\|\/?><"'])(?!.*\s).*$/'
95+
pattern: '/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[-_!@#$%&*+=()^{};:.,\\|\/?><"'])[A-Za-z\d][A-Za-z\d-_!@#$%&*+=()^{};:.,\\|\/?><"']{6,50}$/'
9696
match: true
9797
message: "user.show_error_password_policy"
9898
payload:

0 commit comments

Comments
 (0)