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

Allow whitelisted model attribute properties #4454

Closed
danielsharvey opened this issue Jun 17, 2018 · 3 comments
Closed

Allow whitelisted model attribute properties #4454

danielsharvey opened this issue Jun 17, 2018 · 3 comments
Labels

Comments

@danielsharvey
Copy link
Contributor

Sails version: v1.0.2
Node version: v10.2.1
NPM version: 6.1.0
DB adapter name: sails-mysql
DB adapter version: 1.0.0
Operating system: MacOS 10.13.5


This appears to be a minor regression of behaviour from Sails v0.12.14, whose underlying waterline v0.11.12 allows the use of validations.ignoreProperties[] configuration, which I have used to configure custom behaviour in custom blueprints.

I have proposed a pull request to reintroduce this behaviour:

Allow model attribute properties whitelisted in config/models.js: validations.ignoreProperties[].

This was previously possible in waterline v0.11.12. See waterline/lib/waterline/core/validations.js, specifically line 64-66.

Happy to submit PR for documentation update if this is accepted.

Please advise if this should be handled another way.

@sailsbot
Copy link

@danielsharvey Thanks for posting, we'll take a look as soon as possible.


For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.

@johnabrams7
Copy link
Contributor

Hi danielsharvey, I would say go ahead and make this a PR (a request indeed) and explain the reasoning in the Conversation section of the PR.

@johnabrams7
Copy link
Contributor

johnabrams7 commented Sep 27, 2018

@danielsharvey Actually you might want to hold off on that, here's some background as to why:
#3425 (comment)

Also here's how custom validation rules work in Sails v1.x.

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

No branches or pull requests

3 participants