Skip to content

Commit

Permalink
Disable flatground trick rotation validation rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alianza committed Nov 7, 2024
1 parent 9aa46c7 commit 3c29371
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions models/FlatgroundTrick.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ const FlatgroundTrickSchema = new mongoose.Schema(
values: [0, 180, 360, 540, 720],
message: '"{VALUE}" is not a valid rotation',
},
validate: {
validator: function (value) {
if (value === 0 && this.direction !== DIRECTIONS.none) return false;
},
message: 'Must specify a rotation if there is a direction',
},
// validate: {
// validator: function (value) {
// if (value === 0 && this.direction !== DIRECTIONS.none) return false;
// },
// message: 'Must specify a rotation if there is a direction',
// },
},
landed: {
type: Boolean,
Expand Down

0 comments on commit 3c29371

Please sign in to comment.