-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
471d975
commit 94d0142
Showing
9 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# CnpjValidator | ||
|
||
The `CnpjValidator` class is used to validate CNPJ numbers. It has a single method, `cnpjIsValid`, which receives | ||
a `String` as a parameter and returns a `boolean` value. | ||
|
||
## How to use | ||
|
||
```java | ||
// You can import the class or use the full path | ||
|
||
import io.github.multiform_validator.CnpjValidator; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
String cnpjTrue = "69.807.668/0001-41"; | ||
String cnpjFalse = "61.807.661/0001-48"; | ||
System.out.println(CnpjValidator.cnpjIsValid(cnpjTrue)); // true | ||
System.out.println(CnpjValidator.cnpjIsValid(cnpjFalse)); // false | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# CpfValidator | ||
|
||
The `CpfValidator` class is used to validate CPF numbers. It has a single method, `cpfIsValid`, which receives a `String` as a parameter and returns a `boolean` value. | ||
|
||
## How to use | ||
|
||
```java | ||
// You can also import the method as static or use the full path | ||
|
||
import static io.github.multiform_validator.CpfValidator.cpfIsValid; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
String cpfTrue = "123.456.789-09"; | ||
String cpfFalse = "123.456.789-10"; | ||
System.out.println(cpfIsValid(cpfTrue)); // true | ||
System.out.println(cpfIsValid(cpfFalse)); // false | ||
} | ||
} | ||
``` | ||
|
||
## Other methods | ||
|
||
- [CnpjValidator](https://multiform-validator.github.io/java/classes/CnpjValidator) | ||
|
||
## Return to [Home](https://multiform-validator.github.io/java/) | ||
[]: # (end) |