From 86835e0056244cf03a0be6326bde5fa5e5f71962 Mon Sep 17 00:00:00 2001 From: makkalot Date: Fri, 20 Jun 2008 20:07:04 +0300 Subject: the float validation was easy same as int :) --- funcweb/funcweb/widget_validation.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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): """ -- cgit