Crates.io | verust |
lib.rs | verust |
version | 0.2.4 |
source | src |
created_at | 2023-12-31 10:54:10.144391 |
updated_at | 2023-12-31 14:58:41.613714 |
description | Library verust is a versatile validation library, written in the Rust programming language, enabling the validation of data such as emails, URLS, phone numbers, and passwords. This efficient tool ensures the reliability of your input data and helps to maintain application quality at its highest. |
homepage | https://mano7onam.github.io/verust/ |
repository | https://github.com/mano7onam/verust.git/ |
max_upload_size | |
id | 1084729 |
size | 14,282 |
Library for data validation in Rust.
It provides validation functions for:
You can include verust
library to your project, by adding following to your Cargo.toml
:
[dependencies]
verust = "0.1.0"
And then do a cargo build:
cargo build
First, include the verust
in your Rust file:
extern crate verust;
Then you can use the validation functions in your code as follows:
For email validation:
if verust::email::validate("example@example.com") {
println!("Valid email!");
} else {
println!("Invalid email.");
}
For URL validation:
if verust::url::validate("https://example.com") {
println!("Valid URL!");
} else {
println!("Invalid URL.");
}
And alike for other types of validation.
verust
is distributed under the MIT license. See LICENSE
file for additional information.