Merge branch 'widget' of github.com:souvarin/EWF into widget
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_DECIMAL_VALIDATOR}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_DECIMAL_VALIDATOR
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_REGEXP_VALIDATOR
|
||||||
|
|
||||||
|
create
|
||||||
|
make_decimal_validator
|
||||||
|
|
||||||
|
feature {NONE}
|
||||||
|
|
||||||
|
make_decimal_validator (e: STRING)
|
||||||
|
do
|
||||||
|
make_regexp_validator ("[0-9]+(\\.[0-9]*)?|\\.[0-9]+", e)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_EMAIL_VALIDATOR}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_EMAIL_VALIDATOR
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_REGEXP_VALIDATOR
|
||||||
|
|
||||||
|
create
|
||||||
|
make_email_validator
|
||||||
|
|
||||||
|
feature
|
||||||
|
|
||||||
|
make_email_validator (e: STRING)
|
||||||
|
do
|
||||||
|
make_regexp_validator ("^[a-zA-Z0-9._%%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$", e)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -6,16 +6,19 @@ note
|
|||||||
|
|
||||||
class
|
class
|
||||||
WSF_PHONE_NUMBER_VALIDATOR
|
WSF_PHONE_NUMBER_VALIDATOR
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_VALIDATOR[STRING]
|
|
||||||
|
WSF_REGEXP_VALIDATOR
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make_with_message
|
||||||
|
|
||||||
feature -- Implementation
|
feature {NONE}
|
||||||
|
|
||||||
validate(input:STRING):BOOLEAN
|
make_with_message (e: STRING)
|
||||||
do
|
do
|
||||||
|
make_regexp_validator ("", e)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_REGEXP_VALIDATOR}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_REGEXP_VALIDATOR
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_VALIDATOR [STRING]
|
||||||
|
|
||||||
|
create
|
||||||
|
make_regexp_validator
|
||||||
|
|
||||||
|
feature {NONE}
|
||||||
|
|
||||||
|
make_regexp_validator (r, e: STRING)
|
||||||
|
do
|
||||||
|
make(e)
|
||||||
|
regexp_string := r
|
||||||
|
create regexp
|
||||||
|
regexp.compile (r)
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Implementation
|
||||||
|
|
||||||
|
validate (input: STRING): BOOLEAN
|
||||||
|
do
|
||||||
|
Result := regexp.matches (input)
|
||||||
|
end
|
||||||
|
|
||||||
|
feature
|
||||||
|
|
||||||
|
regexp_string: STRING
|
||||||
|
|
||||||
|
regexp: REGULAR_EXPRESSION
|
||||||
|
|
||||||
|
end
|
||||||
@@ -11,11 +11,9 @@
|
|||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="encoder" location="..\..\text\encoder\encoder-safe.ecf"/>
|
<library name="encoder" location="..\..\text\encoder\encoder-safe.ecf"/>
|
||||||
<library name="gobo_kernel" location="$ISE_LIBRARY\library\gobo\gobo_kernel-safe.ecf"/>
|
|
||||||
<library name="gobo_lexical" location="$ISE_LIBRARY\library\gobo\gobo_lexical-safe.ecf"/>
|
|
||||||
<library name="gobo_parse" location="$ISE_LIBRARY\library\gobo\gobo_parse-safe.ecf"/>
|
|
||||||
<library name="http" location="..\..\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="..\..\network\protocol\http\http-safe.ecf"/>
|
||||||
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json-safe.ecf"/>
|
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json-safe.ecf"/>
|
||||||
|
<library name="pcre" location="$ISE_EIFFEL\unstable\library\text\regexp\pcre\pcre-safe.ecf"/>
|
||||||
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template-safe.ecf"/>
|
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template-safe.ecf"/>
|
||||||
<library name="wsf" location="..\wsf\wsf-safe.ecf"/>
|
<library name="wsf" location="..\wsf\wsf-safe.ecf"/>
|
||||||
<cluster name="api" location=".\api\" recursive="true"/>
|
<cluster name="api" location=".\api\" recursive="true"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user