Multiform Validator
GitHubToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

[!NOTE] I accept help to make the version of the other programming languages.

Multiform-validator

JAVA >=8

Official Website

Source code

📦 Download / Installation

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

Gradle

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.Multiform-Validator:java:0.0.5'
}
Maven

Step 1. Add the JitPack repository to your build file


<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency


<dependency>
    <groupId>com.github.Multiform-Validator</groupId>
    <artifactId>java</artifactId>
    <version>0.0.5</version>
</dependency>
Sbt

Step 1. Add the JitPack repository to your build file

Add it in your build.sbt at the end of resolvers:

resolvers += "jitpack" at "https://jitpack.io"

Step 2. Add the dependency

libraryDependencies += "com.github.Multiform-Validator" % "java" % "0.0.5"
Leiningen

Step 1. Add the JitPack repository to your build file

Add it in your project.clj at the end of repositories:

:repositories [["jitpack" "https://jitpack.io"]]

Step 2. Add the dependency

:dependencies [[com.github.Multiform-Validator/java "0.0.5"]]

Available methods - JAVA (0.0.5)v

Example how to use

CnpjValidator

// 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
    }
}