ccdb-web/app/validations/collection.js
2017-10-07 17:37:24 -07:00

16 lines
519 B
JavaScript

import {
validatePresence,
validateNumber,
} from 'ember-changeset-validations/validators';
export default {
project: validatePresence(true),
studyLocation: validatePresence(true),
collectionMethod: validatePresence(true),
collectionType: validatePresence(true),
numberOfTraps: validateNumber({ allowBlank: true, integer: true, positive: true }),
collectionStartDate: validatePresence(true),
collectionEndDate: validatePresence(true),
// TODO: Fix time formats
}