Move to validate.js under utils/validate.js. Use the validation pattern we have there.