/DataValidator

A library for checking the correctness of any data.

Primary LanguageJava

Java CI hexlet-check Maintainability Test Coverage

Data validator

A library for checking the correctness of any data.

Validation of strings Control methods:

  • required – any non-empty string.
  • minLength – the string is equal to or longer than the specified number.
  • contains – the string contains a specific substring.

Validation of numbers Control methods:

  • required – any number, including zero.
  • positive – positive number.
  • range – the range in which the numbers, including the boundaries.

Validation of Map type objects Control methods:

  • required – Map data type
  • sizeof - is required, the number of key-value pairs in the Map object must be equal to the specified.
  • shape - allows describing validation for Map object values by keys.