Meteor-Community-Packages / meteor-simple-schema

Meteor integration package for simpl-schema
https://github.com/Meteor-Community-Packages/meteor-simple-schema
MIT License
920 stars 162 forks source link

Decimal property not working as expected #702

Closed jpmelnik closed 7 years ago

jpmelnik commented 7 years ago

I've the following field in my Schema and I'm getting an error:

"Error: Invalid definition for minimumPaymentDue field: "decimal" is not a supported property"

The documenation says:

Set to true if type is Number or [Number] and you want to allow non-integers. The default is false.

/**
   * The minimum payment required at this time.
   * [Review]
   */
  minimumPaymentDue: {
    type: Number, 
    optional: true,
    decimal: true
  },
mgscreativa commented 7 years ago

Hi! how did you solve this?

jpmelnik commented 7 years ago

I make a mistake. I confused Meteor Simple Schema package with Node Simple Schema. Meteor Simple Schema use decimal: true. Node Simple Schema use type: Number and SimpleSchema.Integer

q71710 commented 6 years ago

I make a mistake. I confused Meteor Simple Schema package with Node Simple Schema. Meteor Simple Schema use decimal: true. Node Simple Schema use type: Number and SimpleSchema.Integer

How to do that? This is my problem, is anyone help me? https://gist.github.com/q71710/4b00e12963a488938e7f21279182cdba