(errors)
| 968 | } |
| 969 | |
| 970 | _removeDuplicateErrors (errors) { |
| 971 | return errors.reduce((err, obj) => { |
| 972 | let first = true |
| 973 | if (!err) err = [] |
| 974 | err.forEach(a => { |
| 975 | if (a.message === obj.message && a.path === obj.path && a.property === obj.property) { |
| 976 | a.errorcount++ |
| 977 | first = false |
| 978 | } |
| 979 | }) |
| 980 | if (first) { |
| 981 | obj.errorcount = 1 |
| 982 | err.push(obj) |
| 983 | } |
| 984 | return err |
| 985 | }, []) |
| 986 | } |
| 987 | |
| 988 | _checkType (type, value) { |
| 989 | const types = { |