Enum Class ValidationMode

java.lang.Object
java.lang.Enum<ValidationMode>
org.springframework.ai.template.ValidationMode
All Implemented Interfaces:
Serializable, Comparable<ValidationMode>, Constable

public enum ValidationMode extends Enum<ValidationMode>
Validation modes for template renderers.
Since:
1.0.0
Author:
Thomas Vitale
  • Enum Constant Details

    • THROW

      public static final ValidationMode THROW
      If the validation fails, an exception is thrown. This is the default mode.
    • WARN

      public static final ValidationMode WARN
      If the validation fails, a warning is logged. The template is rendered with the missing placeholders/variables. This mode is not recommended for production use.
    • NONE

      public static final ValidationMode NONE
      No validation is performed.
  • Method Details

    • values

      public static ValidationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ValidationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null