use alloc::string::String;
use alloc::vec::Vec;
use crate::validation::schema::SchemaType;
pub fn type_must_be(expected: &SchemaType) -> String {
format!("Type must be {:?}", expected)
}
pub fn value_must_be_between(min: f64, max: f64) -> String {
format!("Value must be between {} and {}", min, max)
}
pub fn value_must_be_at_least(min: f64) -> String {
format!("Value must be at least {}", min)
}
pub fn value_must_be_at_most(max: f64) -> String {
format!("Value must be at most {}", max)
}
pub fn no_range_restriction() -> String {
"No range restriction".to_string()
}
pub fn length_must_be_between(min: usize, max: usize) -> String {
format!("Length must be between {} and {}", min, max)
}
pub fn length_must_be_at_least(min: usize) -> String {
format!("Length must be at least {}", min)
}
pub fn length_must_be_at_most(max: usize) -> String {
format!("Length must be at most {}", max)
}
pub fn no_length_restriction() -> String {
"No length restriction".to_string()
}
pub fn must_be_one_of(allowed: &Vec<String>) -> String {
format!("Must be one of: {}", allowed.join(", "))
}