Skip to content

Commit 1abcd0a

Browse files
Merge pull request #8 from gabriel-logan/main
chore: update docs
2 parents d9907fd + adf8e2c commit 1abcd0a

File tree

6 files changed

+33
-7
lines changed

6 files changed

+33
-7
lines changed

.idea/sonarlint/issuestore/1/d/1d784fce58c3719506730fb9749600554125b511

Whitespace-only changes.

.idea/sonarlint/issuestore/index.pb

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sonarlint/securityhotspotstore/1/d/1d784fce58c3719506730fb9749600554125b511

Whitespace-only changes.

.idea/sonarlint/securityhotspotstore/index.pb

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,32 @@
55

66
## JAVA
77

8-
How to use:
8+
## How to install
99

1010
follow the steps below to use the library in your project.
1111

12-
https://jitpack.io/#multiform-validator/java/0.0.1
12+
https://jitpack.io/#multiform-validator/java/0.0.1
13+
14+
## Example of how to use
15+
16+
```java
17+
import io.github.multiform_validator.Validator;
18+
import io.github.multiform_validator.EmailValidator;
19+
import io.github.multiform_validator.CpfValidator;
20+
import io.github.multiform_validator.CnpjValidator;
21+
22+
public class Main {
23+
public static void main(String[] args) {
24+
System.out.println(emailValidator.isEmail("foo@bar.com")); // true
25+
System.out.println(emailValidator.isEmail("foo@bar")); // false
26+
27+
System.out.println(cpfValidator.cpfIsValid("123.456.789-09")); // true
28+
System.out.println(cpfValidator.cpfIsValid("123.456.789-00")); // false
29+
30+
System.out.println(cnpjValidator.cnpjIsValid("12.345.678/0001-09")); // true
31+
System.out.println(cnpjValidator.cnpjIsValid("12.345.678/0001-00")); // false
32+
}
33+
}
34+
```
35+
36+
Lib is in development, there's other validators that you can use, but they are not yet documented.

0 commit comments

Comments
 (0)