You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/app/validations/intention-permission-http-h...

9 lines
356 B

import { validatePresence } from 'ember-changeset-validations/validators';
import validateSometimes from 'ember-changeset-conditional-validations/validators/sometimes';
export default schema => ({
Name: [validatePresence(true)],
Value: validateSometimes([validatePresence(true)], function() {
return this.get('HeaderType') !== 'Present';
}),
});