Skip to content

Macintosh-ui/Validator-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

Java Validator Library


Specs:

  • String validation
  • Number validation
  • Map validation

Requirements:

  • Java 21

How to use:

  • Import library into your project
  • Add dependecy

Creating schemas:

  • Create object of class Validator
  • validator.String to String validation
  • validator.number to Number validation
  • validator.map to Map validation

String methods
  • .required() to null check
  • .minLength(int length) to String length check
  • .contains(String substring) to search if String contains substring
Number methods
  • .required() to null check
  • .positive() to check if the value is positive
  • .rang(int min, int max) to check if value > min and value < max
Map methods
  • .required() to null check
  • .sizeOf(int size) to check if value size > size
  • .shape(Map<String, BaseSchema> map) to integrated check

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage Java CI

About

Validator library for Java

Resources

Stars

Watchers

Forks

Packages

No packages published