mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
use minLength instead
it’s the same thing :). Thanks @rschamp!
This commit is contained in:
parent
cec3214def
commit
4e568f7c06
2 changed files with 2 additions and 5 deletions
|
@ -12,9 +12,6 @@ module.exports.validations = {
|
|||
notEqualsField: function (values, value, field) {
|
||||
return value !== values[field];
|
||||
},
|
||||
checkboxRequired: function (values, value) {
|
||||
return value.length > 0;
|
||||
},
|
||||
isPhone: function (values, value) {
|
||||
if (typeof value === 'undefined') return true;
|
||||
if (value && value.national_number === '+') return true;
|
||||
|
|
|
@ -534,10 +534,10 @@ module.exports = {
|
|||
options={this.getOrganizationOptions()}
|
||||
onChange={this.onChooseOrganization}
|
||||
validations={{
|
||||
checkboxRequired: true
|
||||
minLength: 1
|
||||
}}
|
||||
validationErrors={{
|
||||
checkboxRequired: formatMessage({
|
||||
minLength: formatMessage({
|
||||
id: 'teacherRegistration.validationRequired'
|
||||
})
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue