core

## Class Validator

- java.lang.Object
- - core.Validator

-     public class Validator
      extends java.lang.Object

  Validates inputs generally based on given requirements.
  Author:
    David Hudec (dwdization@gmail.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `HEX_REGEX`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `Validator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `validateField(ValidatedField field, java.lang.String value)` Validates, that the given String is a valid value for the given field.
    `static boolean` | `validateHexString(java.lang.String hexString)` Validates, that the given String only contains hexadecimal characters.
    `static boolean` | `validateHexStringWithLength(java.lang.String hexString, int length)` Validates, that the given String only contains hexadecimal characters and has given length.
    `static boolean` | `validateHexStringWithLengthBetween(java.lang.String hexString, int minLength, int maxLength)` Validates, that the given String only contains hexadecimal characters and its length is between given boundaries.

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

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

- - ### Field Detail

    - #### HEX_REGEX

          public static final java.lang.String HEX_REGEX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Validator

          private Validator()

  - ### Method Detail

    - #### validateField

          public static boolean validateField(ValidatedField field,
                                              java.lang.String value)

      Validates, that the given String is a valid value for the given field. Uses respective validation of the given field.
      Parameters:
        `field` - field against which to validate
        `value` - String to validate
      Returns:
        true if validation succeeded

    - #### validateHexString

          public static boolean validateHexString(java.lang.String hexString)

      Validates, that the given String only contains hexadecimal characters.
      Parameters:
        `hexString` - String to validate
      Returns:
        true if validation succeeded

    - #### validateHexStringWithLength

          public static boolean validateHexStringWithLength(java.lang.String hexString,
                                                            int length)

      Validates, that the given String only contains hexadecimal characters and has given length.
      Parameters:
        `hexString` - String to validate
        `length` - allowed length
      Returns:
        true if validation succeeded

    - #### validateHexStringWithLengthBetween

          public static boolean validateHexStringWithLengthBetween(java.lang.String hexString,
                                                                   int minLength,
                                                                   int maxLength)

      Validates, that the given String only contains hexadecimal characters and its length is between given boundaries.
      Parameters:
        `hexString` - String to validate
        `minLength` - minimal allowed length
        `maxLength` - maximal allowed length
      Returns:
        true if validation succeeded