diff options
| author | Vincent Prouillet | 2017-11-08 17:47:59 +0100 |
|---|---|---|
| committer | Vincent Prouillet | 2017-11-08 17:47:59 +0100 |
| commit | dcc3b0a42f74bedc6cf57feea0f441e7166aa027 (patch) | |
| tree | a62db24bd3d35349870810a2d7974ce15add8e92 /validator_derive/src/lib.rs | |
| parent | 14a5b7a695de67f4bc2e38d5eeae2eea11fed743 (diff) | |
| download | validator-dcc3b0a42f74bedc6cf57feea0f441e7166aa027.tar.bz2 | |
Feature gate phone feature in validator_derive as well
Diffstat (limited to 'validator_derive/src/lib.rs')
| -rw-r--r-- | validator_derive/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/validator_derive/src/lib.rs b/validator_derive/src/lib.rs index adb5515..1678883 100644 --- a/validator_derive/src/lib.rs +++ b/validator_derive/src/lib.rs @@ -266,6 +266,7 @@ fn find_validators_for_field(field: &syn::Field, field_types: &HashMap<String, S assert_string_type("url", field_type); validators.push(FieldValidation::new(Validator::Url)); }, + #[cfg(feature = "phone")] "phone" => { assert_string_type("phone", field_type); validators.push(FieldValidation::new(Validator::Phone)); |
