pub fn wrap_closure_validation<T: ?Sized, M: IntoVecErrors>(
data: &T,
f: impl FnOnce(&T) -> Result<(), M>,
) -> Result<(), Vec<Error>>
Expand description
This function is used to avoid rustc(E0282) error in #[validate(custom = ...)]
validator on the struct.