Is your feature request related to a problem? Please describe.
When building mjml templates errors sometime sneak in. The templates are often large/complex, and a debugging what the root cause of the error is is difficult.
Describe the solution you'd like
I'd like to pass a template string to a MRML validate method, and it returns a collection of the errors it has encountered. An output similar to what mjml-cli -v produces would be amazing:
$ mjml -v malformed.mjml
Line 8 of test.mjml (b) — Element b doesn't exist or is not registered
Command line error:
Validation failed
... for example:
errors = MRML.validate("...")
[
"Line 8 (b) - Element b doesn't exist or is not registered",
...
]
Hi @autonomous, thanks for the report. The mrml rust library does not provide a validate method. You can open an issue there and if it gets implemented I will add it to mrml-ruby.
Is your feature request related to a problem? Please describe. When building mjml templates errors sometime sneak in. The templates are often large/complex, and a debugging what the root cause of the error is is difficult.
Describe the solution you'd like I'd like to pass a template string to a MRML validate method, and it returns a collection of the errors it has encountered. An output similar to what
mjml-cli -v
produces would be amazing:... for example:
Is this something you'd be open to?