Update form.js
This commit is contained in:
parent
7ee487a0cb
commit
fd5ff9ac8f
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
||||||
window.ls.container.set('form', function () {
|
window.ls.container.set('form', function () {
|
||||||
|
|
||||||
function cast(value, to) {
|
function cast(value, to) {
|
||||||
|
if (value && Array.isArray(value) && to !== 'array') {
|
||||||
|
value = value.map(element => cast(element, to));
|
||||||
|
return value;
|
||||||
|
}
|
||||||
switch (to) {
|
switch (to) {
|
||||||
case 'int':
|
case 'int':
|
||||||
case 'integer':
|
case 'integer':
|
||||||
|
|
Loading…
Reference in a new issue