From ac3810f68d2dd86c17a57593959506bd1b99cab5 Mon Sep 17 00:00:00 2001 From: Andras Mocsary Date: Fri, 6 Sep 2019 16:30:54 +0200 Subject: Add utf-8 non-control chars validator --- README.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 875f066..c422248 100644 --- a/README.md +++ b/README.md @@ -255,6 +255,11 @@ Examples: #[validate] ``` +### non_control_character +Tests whether the String has any utf-8 control caracters, fails validation if it does. +To use this validator, you must enable the `unic` feature for the `validator_derive` crate. +This validator doesn't take any arguments: `#[validate(non_control_character)]`; + ## Struct level validation Often, some error validation can only be applied when looking at the full struct, here's how it works here: -- cgit v1.2.3