Sails: debug: In attribute `provider` of model `user`: debug: The `enum` validation rule is now `isIn` (changing it for you this time).

Created on 5 May 2018  路  8Comments  路  Source: balderdashy/sails

any body, any idea, how to slove enum.? would like to change this already to lift my app

debug: In attribute `provider` of  model `user`:
debug:   The `enum` validation rule is now `isIn` (changing it for you this time).

Sails version:
Node version:
NPM version:
DB adapter name: N/A
DB adapter version: N/A
Operating system:



does this answer your question? question

All 8 comments

Hi @SpaceG! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

It's enough information in error message for problem solving.
In sails v1 validation rule "enum" doesn't exist. Use validation rule "isIn" instead of "enum"

Also read documentation

NachtRitter ! yes, i thought is like this :

```
state: {
type: 'string',
enum: ['pending', 'approved', 'denied'],
defaultsTo: 'pending'
},

thought like this : 

 ```
   state: {
      type: 'string',
      isInEnum: ['pending', 'approved', 'denied'],
      defaultsTo: 'pending'
    },

but is like :

state: { type: 'string', isIn: ['pending', 'approved', 'denied'], defaultsTo: 'pending' },

does this make sense ?

Hi @SpaceG! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

@SpaceG you're close! Looks like you just need to replace isInEnum with isIn:

image

_from Concepts > Models & ORM > Validations_

Hey @mikermcneil Thanks a lot. ! I learn here a lot of the creator of the sailsjs! sailsjs is super easy to use. but i wish a bigger community. - more details and tutorials and post and so on. - would be great. ! i gonna try this right now.

Hi @SpaceG! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

Hi @SpaceG were you able to have success following the suggestion @mikermcneil gave you?

Was this page helpful?
0 / 5 - 0 ratings