The message option is limited to strings, which makes it non-trivial to deal with arrays, objects, etc.
varacceptedValues=[{id: 1,name: 'Banana'},{id: 2,name: 'Apple'},{id: 2,name: 'Mango'}]// Fruit is chosen through select which uses ids for value attributevarconstraints={fruit: {within: acceptedValues.map(function(o){returno.id}),message: function(id){return'^No such fruit '+getFruitById(id)+' available.'}}}
The text was updated successfully, but these errors were encountered:
The
message
option is limited to strings, which makes it non-trivial to deal with arrays, objects, etc.The text was updated successfully, but these errors were encountered: