async-graphql/tests/input_validators.rs

15 lines
317 B
Rust

use async_graphql::validators::StringMinLength;
use async_graphql::*;
#[async_std::test]
pub async fn test_string_min_length() {
struct Query1;
#[Object]
impl Query1 {
async fn test(&self, #[arg(validator(StringMinLength(length = "6")))] id: String) -> bool {
true
}
}
}