Skip to content

Commit

Permalink
Merge pull request #8 from gabriel-logan/main
Browse files Browse the repository at this point in the history
chore: update docs
  • Loading branch information
gabriel-logan authored Jul 9, 2024
2 parents d9907fd + adf8e2c commit 1abcd0a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
Empty file.
2 changes: 0 additions & 2 deletions .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
2 changes: 0 additions & 2 deletions .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,32 @@

## JAVA

How to use:
## How to install

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

https://jitpack.io/#multiform-validator/java/0.0.1
https://jitpack.io/#multiform-validator/java/0.0.1

## Example of how to use

```java
import io.github.multiform_validator.Validator;
import io.github.multiform_validator.EmailValidator;
import io.github.multiform_validator.CpfValidator;
import io.github.multiform_validator.CnpjValidator;

public class Main {
public static void main(String[] args) {
System.out.println(emailValidator.isEmail("foo@bar.com")); // true
System.out.println(emailValidator.isEmail("foo@bar")); // false

System.out.println(cpfValidator.cpfIsValid("123.456.789-09")); // true
System.out.println(cpfValidator.cpfIsValid("123.456.789-00")); // false

System.out.println(cnpjValidator.cnpjIsValid("12.345.678/0001-09")); // true
System.out.println(cnpjValidator.cnpjIsValid("12.345.678/0001-00")); // false
}
}
```

Lib is in development, there's other validators that you can use, but they are not yet documented.

0 comments on commit 1abcd0a

Please sign in to comment.