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

Impossible to create an account #17

Closed
nimaen opened this issue Jun 16, 2015 · 4 comments
Closed

Impossible to create an account #17

nimaen opened this issue Jun 16, 2015 · 4 comments

Comments

@nimaen
Copy link

nimaen commented Jun 16, 2015

Hi, each time I try to create an account, I have the following error :

[{"error":"E_VALIDATION","status":400,"summary":"1 attribute is invalid","model":"User","invalidAttributes":{"email":[{"rule":"email","message":""email" validation rule failed for input: '[email protected]'"}]}}]

@Pierre-Gilles
Copy link
Contributor

Your are not the only one with this strange bug, seems thats sails js validator isn't doing is job well.

A quick fix is to disable email verification ( in api/models/User.js disable line 37, remove email : true ), but that's not the solution.

I'll try to find what's going out :)

@nimaen
Copy link
Author

nimaen commented Jun 16, 2015

Hum right, i'll try to investigate using node --debug :)
Thanks !

@Drillyus
Copy link

Drillyus commented Oct 1, 2015

Hi , the error is that type should be 'email', so the correct model is:
email:{
type:'email',
required:true,
unique:true
}

@Pierre-Gilles
Copy link
Contributor

Yep you are right, normally

email: {
  type:'string', 
  email:true
}

should work, but it seems that there is a bug with Anchor, the validator of sails.js ( balderdashy/sails#3034 ), so I need to do it like you said, I'll change that :)

Thanks for the feedback !

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