Errors are obtained by running the parser, validation is throttle to when the user stops editing for a second.
Line numbers will help reporting errors. Also, disable line breaking to improve readability.