When testing our application we ran into the problem that we couldn't register as a new user or reset the password. Looks like the Register.js and ResetPassword.js are cousing the trouble. These files are coming with the download on <a class="postlink" href="https://aspnetzero.com/Download">https://aspnetzero.com/Download</a>. If I compare sources on github there is a difference
- <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-template/tree/master/src/AbpCompanyName.AbpProjectName.WebMpa/Views/Account">https://github.com/aspnetboilerplate/mo ... ws/Account</a>
- <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/tree/dev/src/MyCompanyName.AbpZeroTemplate.Web/Views/Account">https://github.com/aspnetzero/aspnet-ze ... ws/Account</a> When I use the code from the first url it does work, what is the right code to use and why is the standard code downloaded not working?
Update: The PasswordComplexityHelper is causing the problems. Also if the password meets the requirements it will never submits the form. If I delete the _passwordComplexityHelper code from the javascript files everything works fine, except for the check on the password complexity of course. I think the problem is in
jQuery.validator.addMethod("passwordComplexity", function (value, element) {
there is a rule
if (setting.useUpperCaseLetters && !/[a-z]/.test(value)) {
return false;
}
This always gives false and that's why it never submits. I think it should be
if (setting.useLowerCaseLetters && !/[a-z]/.test(value)) {
return false;
}
Also if you don't configure the maxlength or min length this also goes wrong, because it compares it with zero. Of course this is always true
if (value.length < setting.minLength) {
and because of that it always give a validation error.
1 Answer(s)
-
0
Hi,
Thank you for informing us and for your work. We will solve this issue in the next release. You can follow this issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/388">https://github.com/aspnetzero/aspnet-zero/issues/388</a>