Update mod.rs

This commit is contained in:
Sunli 2021-11-15 20:58:57 +08:00
parent 71cbb9d20c
commit 28f027a8bc

View File

@ -16,7 +16,9 @@ pub use multiple_of::multiple_of;
use crate::{Context, InputType};
/// Represents a custom input value validator.
#[async_trait::async_trait]
pub trait CustomValidator<T: InputType> {
/// Check the value is valid.
async fn check(&self, ctx: &Context<'_>, value: &T) -> Result<(), String>;
}