Class MissingValueHelper

  • All Implemented Interfaces:
    com.github.jknack.handlebars.Helper<Object>

    public class MissingValueHelper
    extends Object
    implements com.github.jknack.handlebars.Helper<Object>
    Handlebars helper that will add a missing field error to the current ValidationResult if the parameter value is missing.
    Author:
    avasquez
    • Field Detail

      • validationResult

        protected ThreadLocal<org.craftercms.commons.validation.ValidationResult> validationResult
    • Constructor Detail

      • MissingValueHelper

        protected MissingValueHelper()
    • Method Detail

      • getValidationResult

        public org.craftercms.commons.validation.ValidationResult getValidationResult()
      • clearValidationResult

        public void clearValidationResult()
      • apply

        public Object apply​(Object context,
                            com.github.jknack.handlebars.Options options)
                     throws IOException
        Specified by:
        apply in interface com.github.jknack.handlebars.Helper<Object>
        Throws:
        IOException