Form validation improvements. Added support captions for "$each"
Suppose we need to do a validation like this:
And we want to use construction like this:
In this case we should set captions for all 100500 properties like this:
...
'crimeCases.$each.125.data.discardReason:caption' () {
return this.$ut('app_crimeCase.discardReason')
},
'crimeCases.$each.126.data.discardReason:caption' () {
return this.$ut('app_crimeCase.discardReason')
}
...
Otherwise, after validation, we will get an error like this:
After improvement, we can write like this:
'crimeCases.data.offence:caption' () {
return this.$ut('app_crimeCase.offence')
},
'crimeCases.data.discardReason:caption' () {
return this.$ut('app_crimeCase.discardReason')
}
and get correct error like this:
Edited by Ruslan Onyshchenko