According to the documentation, the .valid method will return the root element if the data are valid and false otherwise.
Instead, when the data are indeed valid, the function is returning 'true', not the 'root element'.
I did not test the 'false' condition, presumably that is working fine.
According to the documentation, the
.valid
method will return the root element if the data are valid and false otherwise. Instead, when the data are indeed valid, the function is returning 'true', not the 'root element'. I did not test the 'false' condition, presumably that is working fine.