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

Birthdate bug on registration #14

Closed
Lesterpig opened this issue Jun 14, 2015 · 11 comments
Closed

Birthdate bug on registration #14

Lesterpig opened this issue Jun 14, 2015 · 11 comments

Comments

@Lesterpig
Copy link

Cannot register myself using the form (birthdate bug):

 [{"error":"E_VALIDATION","status":400,"summary":"1 attribute is invalid","model":"User","invalidAttributes":{"birthdate":[{"rule":"date","message":"`undefined` should be a date (instead of \"01/01/01\", which is a string)"}]}}] 
@Lesterpig Lesterpig changed the title Better validation on registration Birthdate bug on registration Jun 14, 2015
@Pierre-Gilles
Copy link
Contributor

The date should be in the "DD/MM/YYYY" format!

If you are on chrome there is a datetime picker box which should appear.

But you are right, the message is ugly for the user, I add this to my bug list, thx for your feedback :)

@Lesterpig
Copy link
Author

Thx for the quick reply :-)
Even with this format, it did not work using Firefox (and no date picker).
Fixed the bug by modifying the session controler, but not really pleasant ;(

Btw, good work! Still need a lot more, I will probably contribute in the next weeks!

@Pierre-Gilles
Copy link
Contributor

Hum.. Some people have troubles too with email validation, that's very weird maybe sails validator isn't working well... I'm going to investigate :)

Great ! If you want to contribute, there are two ways :

  • If you want to implement a new functionality, create a Gladys module ( check the website for how to build a module )
  • If you want to simply correct something, or improve the Gladys core, just make a pull request :)

@ghost
Copy link

ghost commented Jun 23, 2015

même probléme avec la date de naissance impossble de passer l'enregistrement utilisateur :

J'utlise firefox pas de chrome; comment je passe ce formulaire d'inscrption ?

j'ai essayer ces format ça passe pas :

01012001
01/01/2001

ça passe pas ????

@Lesterpig
Copy link
Author

Si besoin, je pourrai proposer un fix prochainement !

@Pierre-Gilles
Copy link
Contributor

Petite question, l'interface que tu as es en anglais ou français ?

Est-ce que tu pourrais tester en utilisant un format de date anglais ? ( YYYY-MM-DD ). Je soupçonne sails de s'adapter à la langue.

@ghost
Copy link

ghost commented Jun 23, 2015

Effectivement ça fonctionne avec la date à l'anglais sous fifrefox

@Pierre-Gilles
Copy link
Contributor

Très bien, du coup ça n'est pas un bug alors, juste que sails.js s'adapte à la langue de l'utilisateur pour demander la langue dans le bon format :) Il faudrait juste le préciser à l'utilisateur, mais ça me rassure ça n'est pas un bug.

@Molkobain
Copy link

I'm reopening that question as I think we should do something more userfriendly. That is IMO a huge blocker when people want to try the application. Not having information about how to create a simple account might let people think that the software is not easy to use;

Are you saying, that the date format in the registration page is YYYY-MM-DD when the browser locale is set to en-EN and that it become DD/MM/YYYY when it is set to fr-FR ?

If so, I propose to create a new parameter in the config/locales/*.json, named "birthday-pattern". We should set its values to "YYYY-MM-DD" for en.json, "JJ/MM/AAAA" for fr.json (and appropriate variations for the others).
Finally we could update the registration form by adding a placeholder attribute to the birthdate input.

What do you think, should I do it and propose a PR ?

@Pierre-Gilles
Copy link
Contributor

I definitely agree with you ! That's what I was planning to do but with all the little things I have to fix everywhere, I didn't do it..

Don't hesitate to propose a PR :)

Thanks for proposing !

@Molkobain
Copy link

Cool, I'll do it tomorrow then.

rpochet added a commit to rpochet/Gladys that referenced this issue Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants