async-graphql/tests/input_validators.rs
2020-05-27 10:25:59 +08:00

15 lines
318 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
}
}
}