summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-20 20:07:04 +0300
committermakkalot <makkalot@gmail.com>2008-06-20 20:07:04 +0300
commit86835e0056244cf03a0be6326bde5fa5e5f71962 (patch)
tree85223d27b811593bf9bcd63ac5e0181ef613a2b6 /funcweb
parentf0aaad1b108a5abfd22c0502b68a91b9af01caf7 (diff)
downloadthird_party-func-86835e0056244cf03a0be6326bde5fa5e5f71962.tar.gz
third_party-func-86835e0056244cf03a0be6326bde5fa5e5f71962.tar.xz
third_party-func-86835e0056244cf03a0be6326bde5fa5e5f71962.zip
the float validation was easy same as int :)
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/widget_validation.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/funcweb/funcweb/widget_validation.py b/funcweb/funcweb/widget_validation.py
index 4edf544..9abf2fd 100644
--- a/funcweb/funcweb/widget_validation.py
+++ b/funcweb/funcweb/widget_validation.py
@@ -97,7 +97,22 @@ class WidgetSchemaFactory(object):
Gets the options of the float type and adds a
new validator to validator_list
"""
- pass
+
+ #the initializer for the float_validator
+ float_data_set = {}
+
+ if self.method_argument_dict[argument_name].has_key('min'):
+ float_data_set['min']=self.method_argument_dict[argument_name]['min']
+ if self.method_argument_dict[argument_name].has_key('max'):
+ float_data_set['max']=self.method_argument_dict[argument_name]['max']
+
+ #add the validator to the list
+ if float_data_set:
+ self.validator_list[argument_name]=MinionFloatValidator(**float_data_set)
+ else:
+ self.validator_list[argument_name]=MinionFloatValidator()
+
+
def _add_list_validator(self,argument_name):
"""