Class Validators

java.lang.Object
com.pig4cloud.plugin.excel.kit.Validators

public final class Validators extends Object
校验工具
Author:
L.cm
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final jakarta.validation.Validator
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Set<jakarta.validation.ConstraintViolation<T>>
    validate(T object)
    Validates all constraints on object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VALIDATOR

      private static final jakarta.validation.Validator VALIDATOR
  • Constructor Details

    • Validators

      private Validators()
  • Method Details

    • validate

      public static <T> Set<jakarta.validation.ConstraintViolation<T>> validate(T object)
      Validates all constraints on object.
      Type Parameters:
      T - the type of the object to validate
      Parameters:
      object - object to validate
      Returns:
      constraint violations or an empty set if none
      Throws:
      IllegalArgumentException - if object is null or if null is passed to the varargs groups
      ValidationException - if a non recoverable error happens during the validation process