Logo Lanfrica

ShaquilFaizal/MozValid4J

Domain:

digital infrastructure

Record type:

software
Creator:
Sha
Host:
MozValid4J is a Java validation library made for Mozambique 🇲🇿. It helps validate different data types like IDs and contact info to meet local standards # MozValid4J 🇲🇿 #### This project is a Java validation library made for Mozambique. ## Table of Contents - Installation - Usage - Mobile Number - Options - Example - NUIT - IBAN - Identity Number - Car Plate Number - Options - Example ## Installation To use MozValid4J in your Java project, include the following Maven dependency: ```xml ``` # `Usage` MozValid4J offers a set of annotations to validate various Mozambican data types in your Java classes. ## `Mobile Number` #### Check if a string is a valid mozambican mobile number. ### Options | Option | Type | Accepted Value(s) | Description | |------------------|----------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | allowedOperators | string[] | `vodacom`, `tmcel`, `movitel` |List of mobile network operators to limit the validation on. If passed an emtpy array, it will validate for all network operators. | | countryCode | string | `optional`, `required`,`off` | `optional`: the country code in the number being validated is optional. `required` : only return true if the number includes the country code. `off` : only return true if the number does not include the country code. The country code can be in either `+258 …