how to validate a Option type with custom validate function?
Closed this issue · 1 comments
Silentdoer commented
such as field1: Option<String>
Keats commented
It depends on the field type, if it's a struct, you can use require_nested
like so: https://github.com/Keats/validator/blob/master/validator_derive_tests/tests/required.rs#L25-L28
I can't remember how that works for non structs though.