org.keycloak.services.validation

## Class Validation

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

-     public class Validation
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FIELD_EMAIL`
    `static String` | `FIELD_OTP_CODE`
    `static String` | `FIELD_OTP_LABEL`
    `static String` | `FIELD_PASSWORD`
    `static String` | `FIELD_PASSWORD_CONFIRM`
    `static String` | `FIELD_USERNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Validation()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<FormMessage>` | `getFormErrorsFromValidation(List<ValidationException.Error> errors)`
    `static boolean` | `isBlank(String s)` Check if string is blank (null or lenght is 0 or contains only white characters)
    `static boolean` | `isEmailValid(String email)`
    `static boolean` | `isEmpty(String s)` Check if string is empty (null or lenght is 0)

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FIELD_PASSWORD_CONFIRM

          public static final String FIELD_PASSWORD_CONFIRM

      See Also:
        Constant Field Values

    - #### FIELD_EMAIL

          public static final String FIELD_EMAIL

      See Also:
        Constant Field Values

    - #### FIELD_PASSWORD

          public static final String FIELD_PASSWORD

      See Also:
        Constant Field Values

    - #### FIELD_USERNAME

          public static final String FIELD_USERNAME

      See Also:
        Constant Field Values

    - #### FIELD_OTP_CODE

          public static final String FIELD_OTP_CODE

      See Also:
        Constant Field Values

    - #### FIELD_OTP_LABEL

          public static final String FIELD_OTP_LABEL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Validation

          public Validation()

  - ### Method Detail

    - #### 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)

    - #### getFormErrorsFromValidation

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

Copyright © 2021 JBoss by Red Hat. All rights reserved.