forked from robotex82/markerb
-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default validation level to
strict
and honor validation_level
Before this commit MJML-Rails *always* raised an exception if there is any template validation error. In MJML there are two validation levels though (besides disabling validation at all): - `strict`: Raise an error if there are any problems, abort - `soft`: Do your best and compile what you can, but do not raise any error. Output errors on stderr. Right now it does not matter what validation level is used in MJML-Rails: It always raises an error if something is wrong with the template, which actually makes the setting `MJML.validation_level` superfluous. With this commit, MJML-Rails follows the MJML convention to only abort if the validation level is `strict`. If it is `soft`, it lets MJML do what it can and only logs the errors, like MJML does. To prevent apps using the default configuration from breaking, the default validation level is changed to `strict`, too. This means it raises an error on an invalid template like it did before.
- Loading branch information
Showing
5 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters