Added checkbox list, modified form validation
This commit is contained in:
@@ -9,7 +9,7 @@ class
|
||||
|
||||
inherit
|
||||
|
||||
WSF_MULTI_CONTROL
|
||||
WSF_MULTI_CONTROL [WSF_CONTROL]
|
||||
|
||||
create
|
||||
make_form_control
|
||||
@@ -22,8 +22,24 @@ feature {NONE}
|
||||
tag_name := "form"
|
||||
end
|
||||
|
||||
feature
|
||||
feature -- Validation
|
||||
|
||||
|
||||
validate: BOOLEAN
|
||||
do
|
||||
Result := True
|
||||
across
|
||||
controls as c
|
||||
until
|
||||
Result = False
|
||||
loop
|
||||
-- TODO: Change generic parameter of elm from ANY to <WILDCARD> if something like that is available in Eiffel.
|
||||
-- Otherwise, check separately for STRING, LIST...
|
||||
if attached {WSF_FORM_ELEMENT_CONTROL[ANY]} c.item as elem then
|
||||
if not elem.is_valid then
|
||||
Result := False
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user