Class RegexFormat

java.lang.Object
com.networknt.schema.format.RegexFormat
All Implemented Interfaces:
Format

public class RegexFormat extends Object implements Format
Format for regex.
  • Constructor Details

    • RegexFormat

      public RegexFormat()
  • Method Details

    • matches

      public boolean matches(ExecutionContext executionContext, ValidationContext validationContext, String value)
      Description copied from interface: Format
      Determines if the value matches the format.
      Specified by:
      matches in interface Format
      Parameters:
      executionContext - the execution context
      validationContext - the validation context
      value - to match
      Returns:
      true if matches
    • getName

      public String getName()
      Description copied from interface: Format
      Gets the format name.
      Specified by:
      getName in interface Format
      Returns:
      the format name as referred to in a json schema format node.
    • getMessageKey

      public String getMessageKey()
      Description copied from interface: Format
      Gets the message key to use for the message.

      See jsv-messages.properties.

      The following are the arguments.
      {0} The instance location
      {1} The format name
      {2} The error message description
      {3} The input value

      Specified by:
      getMessageKey in interface Format
      Returns:
      the message key