From 1ec14ec397535a6f0a684fd761e501b9f684fa7a Mon Sep 17 00:00:00 2001 From: YNH Webdev Date: Sun, 10 Nov 2013 13:53:20 +0100 Subject: [PATCH] Fix email validation and min and max validator --- .../wsf_js_widget/kernel/validator/wsf_email_validator.e | 2 +- .../wsf_js_widget/kernel/validator/wsf_max_validator.e | 6 +++--- .../wsf_js_widget/kernel/validator/wsf_min_validator.e | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/draft/library/wsf_js_widget/kernel/validator/wsf_email_validator.e b/draft/library/wsf_js_widget/kernel/validator/wsf_email_validator.e index f3cd93b3..64dfee02 100644 --- a/draft/library/wsf_js_widget/kernel/validator/wsf_email_validator.e +++ b/draft/library/wsf_js_widget/kernel/validator/wsf_email_validator.e @@ -19,7 +19,7 @@ feature {NONE} -- Initialization make_email_validator (e: STRING) -- Initialize with specified error message which will be displayed on validation failure do - make_regexp_validator ("^[a-zA-Z0-9._%%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$", e) + make_regexp_validator ("^[a-zA-Z0-9._%%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$", e) end end diff --git a/draft/library/wsf_js_widget/kernel/validator/wsf_max_validator.e b/draft/library/wsf_js_widget/kernel/validator/wsf_max_validator.e index 2dc91970..2357f93f 100644 --- a/draft/library/wsf_js_widget/kernel/validator/wsf_max_validator.e +++ b/draft/library/wsf_js_widget/kernel/validator/wsf_max_validator.e @@ -5,11 +5,11 @@ note revision: "$Revision$" class - WSF_max_VALIDATOR [G] + WSF_MAX_VALIDATOR [G->FINITE[ANY]] inherit - WSF_VALIDATOR [LIST [G]] + WSF_VALIDATOR [G] redefine state end @@ -28,7 +28,7 @@ feature {NONE} -- Initialization feature -- Implementation - is_valid (input: LIST [G]): BOOLEAN + is_valid (input: G): BOOLEAN do Result := input.count < max or input.count = max end diff --git a/draft/library/wsf_js_widget/kernel/validator/wsf_min_validator.e b/draft/library/wsf_js_widget/kernel/validator/wsf_min_validator.e index 68d299d8..a496f500 100644 --- a/draft/library/wsf_js_widget/kernel/validator/wsf_min_validator.e +++ b/draft/library/wsf_js_widget/kernel/validator/wsf_min_validator.e @@ -5,11 +5,11 @@ note revision: "$Revision$" class - WSF_MIN_VALIDATOR [G] + WSF_MIN_VALIDATOR [G->FINITE[ANY]] inherit - WSF_VALIDATOR [LIST [G]] + WSF_VALIDATOR [G] redefine state end @@ -28,7 +28,7 @@ feature {NONE} -- Initialization feature -- Implementation - is_valid (input: LIST [G]): BOOLEAN + is_valid (input: G): BOOLEAN do Result := input.count > min or input.count = min end