It does seem to me that CodeMirror does not support syntax checking or validation in any way,
have you found some indicator that it can do so?
it would be just wonderful if you found or made this mythical beast....
Director (Research Support) of Academic IT Services
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431