use minLength instead

it’s the same thing :). Thanks @rschamp!
This commit is contained in:
Matthew Taylor 2016-08-03 14:34:07 -04:00
parent cec3214def
commit 4e568f7c06
2 changed files with 2 additions and 5 deletions

View file

@ -12,9 +12,6 @@ module.exports.validations = {
notEqualsField: function (values, value, field) { notEqualsField: function (values, value, field) {
return value !== values[field]; return value !== values[field];
}, },
checkboxRequired: function (values, value) {
return value.length > 0;
},
isPhone: function (values, value) { isPhone: function (values, value) {
if (typeof value === 'undefined') return true; if (typeof value === 'undefined') return true;
if (value && value.national_number === '+') return true; if (value && value.national_number === '+') return true;

View file

@ -534,10 +534,10 @@ module.exports = {
options={this.getOrganizationOptions()} options={this.getOrganizationOptions()}
onChange={this.onChooseOrganization} onChange={this.onChooseOrganization}
validations={{ validations={{
checkboxRequired: true minLength: 1
}} }}
validationErrors={{ validationErrors={{
checkboxRequired: formatMessage({ minLength: formatMessage({
id: 'teacherRegistration.validationRequired' id: 'teacherRegistration.validationRequired'
}) })
}} }}