andreypopp / validated

Validate your configurations with precise error messages
91 stars 14 forks source link

oneOf with arrayOf in IE11 #22

Open ericyliu opened 6 years ago

ericyliu commented 6 years ago

oneOf seems to be order dependent and not working as intended when supplied with arrayOf as one of the arguments

In IE11: oneOf(arrayOf(mapping()), boolean) breaks when field is a boolean

oneOf(boolean, (arrayOf(mapping())) breaks when field is an array

The error message by validated is: Unable to get property 'split' of undefined or null reference

Edit Nevermind this happens with all oneOfs, regardless if there is an arrayOf inside or not

pronebird commented 6 years ago

Hi,

Is it in IE11 only? Do you mind to provide a jsbin or something to reproduce this issue?