mjml-net
mjml-net copied to clipboard
Migration from 1 to 3, validation
Hi
We are switching from version 1.24.0 to 3.11.0 and we have some strange behaviour on validation.
From our test, using "SoftValidator.Instance" for validation on MjmlRenderer.
- It does test that tag is a MJML knowned tag and give error if not:
<mjml><mj-body><a href=https://www.google.com/>My Link</mj-body></mjml> is on error
- It does not test if the tag is correct when Mjml tag is final
<mjml><mj-body><mj-section><mj-column><mj-text><ari href=https://www.google.com/ >My Link</are></mj-text></mj-column></mj-section></mj-body></mjml> works
- It does not check if text is in a final mjml tag and does not generate HTML
<mjml><mj-body><mj-body>My Text</mj-body></mj-body></mjml> does not give error but does not generate html
- It does not check that mjml tag are closed but generate it:
<mjml><mj-body><mj-section><mj-column><mj-text>MyText</mjml> does not give errror, but generate html
Are those comportement are what expected?
Is it normal to not check that validators do not check that the tag is final when there is no tag inside?
Is it normal to not check closing tag and still generate html ?
Thanks
Regards
Marc