Class Validation

java.lang.Object
org.keycloak.services.validation.Validation

public class Validation extends Object
  • Field Details

  • Constructor Details

    • Validation

      public Validation()
  • Method Details

    • isEmpty

      public static boolean isEmpty(String s)
      Check if string is empty (null or lenght is 0)
      Parameters:
      s - to check
      Returns:
      true if string is empty
    • isBlank

      public static boolean isBlank(String s)
      Check if string is blank (null or lenght is 0 or contains only white characters)
      Parameters:
      s - to check
      Returns:
      true if string is blank
    • isEmailValid

      public static boolean isEmailValid(String email)
    • isUsernameValid

      public static boolean isUsernameValid(String username)
    • getFormErrorsFromValidation

      public static List<FormMessage> getFormErrorsFromValidation(List<ValidationException.Error> errors)