Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm registration validation is working properly #2321

Closed
craigh opened this issue Mar 5, 2015 · 16 comments
Closed

Confirm registration validation is working properly #2321

craigh opened this issue Mar 5, 2015 · 16 comments
Assignees
Milestone

Comments

@craigh
Copy link
Member

craigh commented Mar 5, 2015

#1805 was closed without merging
#1804 removed all the old prototype files and didn't replace any code.

2da396f removed same from admin side since all the files were gone anyway

it is unknown if any JS validation is occurring before a user is created.

has anyone replaced the old js validation?

@phaidon @shefik @jusuff @Guite

@craigh craigh added the Blocker label Mar 5, 2015
@craigh craigh added this to the 1.4.0 milestone Mar 5, 2015
@craigh
Copy link
Member Author

craigh commented Mar 6, 2015

I checked on this a little. I found that PHP also validates the data so there appears to be no danger of double-registering the same username (for example) or other possible data-corruption.

The old getRegistrationErrorsAction method still exists in the ajax controller and could be used if needed. but nothing calls it at the moment.

@jusuff did you say you can look into re-activating ajax validation here or should we discuss another solution?

@shefik
Copy link
Contributor

shefik commented Mar 7, 2015

Just add Webshim for the HTML5 validation, as a polyfill for browser support.

@craigh
Copy link
Member Author

craigh commented Mar 7, 2015

I don't know anything about those technologies. A PR would be welcome!

@Guite
Copy link
Member

Guite commented Mar 7, 2015

@shefik this is not about simple checks like mandatory fields. This issue is about extended validation, like username may not be already used, password must not be equal username, email address may not be already used, and so on.

@shefik
Copy link
Contributor

shefik commented Mar 7, 2015

@Guite Webshim is still needed for browsers such as Safari on Mac, to add support for attributes such as "required". As an example, the attribute "required" works correctly on Chrome on Mac, and the form does not submit via HTML5 validation.

https://github.com/aFarkas/webshim

@craigh
Copy link
Member Author

craigh commented Mar 8, 2015

@shefik did your PR only add the library? Did you implement any part of the solution? When I asked for a PR, I assumed it would be understood that you would also do that.

@shefik
Copy link
Contributor

shefik commented Mar 8, 2015

@craigh Yes, it only added the Webshim library for the moment, as well as some validation for the installer. I can submit another pull request to specifically address the registration/user forms. I've been going through much of the core in progression, so when I get fully past the installer tickets, I can move on to User and Profile mods, and so on.

@craigh
Copy link
Member Author

craigh commented Mar 8, 2015

Feel free to submit many smaller PRs instead of one large one at the end. I would rather have smaller commits anyway

@cmfcmf
Copy link
Contributor

cmfcmf commented Mar 8, 2015

Make sure not to validate any hooks via Ajax, because this breaks certain modules (such as the Captcha module).

@craigh
Copy link
Member Author

craigh commented Mar 10, 2015

Yes, it only added the Webshim library for the moment, as well as some validation for the installer.

I'm not seeing any usage of this in the installer. can you be more specific where it was added?

@craigh
Copy link
Member Author

craigh commented Mar 17, 2015

ping @shefik feedback requested ^^^

@shefik
Copy link
Contributor

shefik commented Mar 19, 2015

@craigh To see it working, use Safari on Mac, you will see that HTML5 form validation is working on the "required" fields in installer. Without webshim, Safari did not fully support HTML 5 form validation. Therefore, the forms were able to bypass validation. The webshim displays the appropriate validation message and prevents the form from being submitted if invalid. As a comparison, view the same pages via Chrome on Mac. That particular browser already has built-in support for HTML 5 form validation. Therefore, the webshim is not used.

@jusuff
Copy link
Member

jusuff commented Mar 19, 2015

What's about this ticket? Does anyone work on it? And I mean initial issue - validating via ajax user entries (eg - is username free to use).

@craigh
Copy link
Member Author

craigh commented Mar 19, 2015

You are 😉 ASAP 😄

@jusuff jusuff self-assigned this Mar 19, 2015
@jusuff
Copy link
Member

jusuff commented Mar 19, 2015

Ok :)

@Guite
Copy link
Member

Guite commented Mar 30, 2015

Closed by #2377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants