lumina-framework 0.1.7

A beautiful, fast, and elegant web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
use validator::Validate;
use serde::Deserialize;

#[derive(Deserialize, Validate)]
pub struct StoreUserRequest {
    #[validate(length(min = 3, message = "Nama minimal 3 karakter"))]
    pub name: String,

    #[validate(email(message = "Format email tidak valid"))]
    pub email: String,
}