Skip to content
Merged
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
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.

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.