You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validation error when not using email for signup #820
I don't want my users to need email to signup for my app so by simply extending the email property in users, I changed the email requirement to false, however, my app gives me an error saying 'email' can't be blank meaning it's a validatesPresenceOf('email') method that's causing this but it's nowhere to be found in code which is why I am confused as to how to overcome this error. Please assist me on how to rid the presence requirement for email. My user model extends 'User' by the way.
I do not want to use email as a requirement, in fact I'm not even using username/pass as a requirement to signup, I simply want to be able to have the user type in their name and that should sign them up.
Here are more details of my user.json:
...
"properties": {
"username": {
"type": "string",
"required": false
},
"password": {
"type": "string",
"required": false
},
"email": {
"type": "string",
"required": false
},
"name": {
"type": "string",
"required": true
}
}, ...
changed the title [-]I get a validation error when I don't want to use email for signup[/-][+]Validation error when not using email for signup[/+]on Nov 15, 2014
@superkhau It's ok to close this one, thanks for checking.
@skyserpent The current implementation of User.login allows clients to login via email+password, that's why the email field is required and must be unique. We would like to refactor the authentication to allow developers to provide their own User model (see "Pluggable authentication providers decoupled from the user model" in Roadmap), but that won't happen in the near future.
Activity
[-]I get a validation error when I don't want to use email for signup[/-][+]Validation error when not using email for signup[/+]superkhau commentedon Feb 26, 2015
Please post questions to https://groups.google.com/forum/#!forum/loopbackjs. See https://github.com/strongloop/loopback/wiki/Reporting-issues#question for more details.
@bajtos @raymondfeng @ritch PTAL, I want to close, but this could also be a bug. Labeling with Question for now.
bajtos commentedon Feb 26, 2015
@superkhau It's ok to close this one, thanks for checking.
@skyserpent The current implementation of
User.loginallows clients to login via email+password, that's why the email field is required and must be unique. We would like to refactor the authentication to allow developers to provide their ownUsermodel (see "Pluggable authentication providers decoupled from the user model" in Roadmap), but that won't happen in the near future.bajtos commentedon Feb 26, 2015
Let's move the discussion to #1137.