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

unique: true works bad with sails-mongo. #145

Open
misterjt opened this issue Apr 16, 2016 · 1 comment
Open

unique: true works bad with sails-mongo. #145

misterjt opened this issue Apr 16, 2016 · 1 comment

Comments

@misterjt
Copy link

I happened to notice on my production server that i can create several users with the same username or emails. I use mongodb on this server.
I started to google, and found, that sails-mongo almost not working with unique:true.
Сould you please implement an additional check on the uniqueness of username and email?

@tjwebb
Copy link
Member

tjwebb commented Apr 16, 2016

You can extend the models to add whichever constraints you wish. If you'd like to add this to the core, please submit a PR

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

2 participants