* Creates a ValidationError by transforming the fields from string to number * @param {Object!} error an object whose strusture is the same as * ValidationError, except that the fields are strings. * @return {Object!} a ValidationError
(error)
| 73 | * @return {Object!} a ValidationError |
| 74 | */ |
| 75 | function digitizeValidationErrorFields(error) { |
| 76 | return { |
| 77 | ...error, |
| 78 | severity: SEVERITY.numberByName.get(error.severity), |
| 79 | code: CODE.numberByName.get(error.code), |
| 80 | }; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * When transforming validation errors and validation results from jspb to plain |