Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Java CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CheckMate

[![Build](https://github.com/EpicBear/CheckMate/actions/workflows/java-ci.yml/badge.svg)](https://github.com/EpicBear/CheckMate/actions/workflows/java-ci.yml)
![License](https://img.shields.io/github/license/EpicBear/CheckMate)
[![Build](https://img.shields.io/github/actions/workflow/status/epic-bear/checkmate/java-ci.yml?branch=main&label=build)](https://github.com/epic-bear/checkmate/actions/workflows/java-ci.yml)
[![License](https://img.shields.io/github/license/epic-bear/checkmate)](https://github.com/epic-bear/checkmate/blob/main/LICENSE)
![Version](https://img.shields.io/badge/version-0.1.0-blue)

CheckMate is a small Java validation library with:
Expand Down Expand Up @@ -54,9 +54,13 @@ ValidationResult result = Validators.password("abc")
.isStrongPassword() // min length + digit + uppercase + special char
.validateResult();

if (!result.isValid()) {
System.out.println(result.getAllErrors());
}
if(!result.

isValid()){
System.out.

println(result.getAllErrors());
}
```

### Add a custom rule in chain
Expand Down Expand Up @@ -192,10 +196,18 @@ ValidationResult result = validator.validate(java.util.Map.of(
"password", "weak"
));

System.out.println(result.isValid()); // false
System.out.println(result.getFieldErrors());
System.out.println(result.getErrorsForField("email"));
System.out.println(result.getAllErrors());
System.out.

println(result.isValid()); // false
System.out.

println(result.getFieldErrors());
System.out.

println(result.getErrorsForField("email"));
System.out.

println(result.getAllErrors());
```

## Custom rules
Expand Down
Loading