meteor / validation-error

Standardized validation error format for Meteor
https://atmospherejs.com/mdg/validation-error
Other
12 stars 4 forks source link

Cannot add more fields to the ValidatedError #14

Open namirsab opened 8 years ago

namirsab commented 8 years ago

When I try this:

        throw new ValidationError([{
            name: 'projectId',
            type: 'project-not-found',
            value: projectId
        }]);

It's complaining with this error:

{error: "validation-error", reason: "errors.0.value is not allowed by the schema", details: Array[1], message: "errors.0.value is not allowed by the schema [validation-error]", errorType: "Meteor.Error"…}

I'm using version 0.2.0 because it doesn't let me upgrade it because of aldeed:simple-schema

error: Conflict: Constraint mdg:validation-error@0.5.1 is not satisfied by mdg:validation-error 0.2.0.                                                                                
   Constraints on package "mdg:validation-error":                                                                                                                                        
   * mdg:validation-error@0.5.1 <- ppp:ppp-projects-validators 0.0.1 <- ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1                                                                 
   * mdg:validation-error@0.2.0 <- aldeed:simple-schema 1.5.3 <- mdg:validation-error 0.2.0 <- ppp:ppp-projects-validators 0.0.1 <-ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1     
   * mdg:validation-error@0.2.0 <- aldeed:simple-schema 1.5.3 <- ppp:ppp-launch 0.0.1 <- ppp:ppp-app-editor 0.0.1