Commit 8750027d authored by Jérome Perrin's avatar Jérome Perrin

use field._validate_helper to use external validators defined on editable

fields


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27255 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae099606
...@@ -2572,7 +2572,7 @@ class ListBoxValidator(Validator.Validator): ...@@ -2572,7 +2572,7 @@ class ListBoxValidator(Validator.Validator):
error_result_key = my_field.id + '_%s' % o.uid error_result_key = my_field.id + '_%s' % o.uid
REQUEST.cell = o REQUEST.cell = o
try: try:
value = my_field.validator.validate(my_field, key, REQUEST) # We need cell value = my_field._validate_helper(key, REQUEST) # We need cell
# Here we set the property # Here we set the property
listbox[uid[4:]][sql] = value listbox[uid[4:]][sql] = value
except ValidationError, err: except ValidationError, err:
...@@ -2614,7 +2614,7 @@ class ListBoxValidator(Validator.Validator): ...@@ -2614,7 +2614,7 @@ class ListBoxValidator(Validator.Validator):
key = 'field_%s_%s' % (my_field.id, o.uid) key = 'field_%s_%s' % (my_field.id, o.uid)
error_result_key = '%s_%s' % (my_field.id, o.uid) error_result_key = '%s_%s' % (my_field.id, o.uid)
try: try:
value = my_field.validator.validate(my_field, key, REQUEST) # We need cell value = my_field._validate_helper(key, REQUEST) # We need cell
result[uid[4:]][sql] = value result[uid[4:]][sql] = value
except ValidationError, err: except ValidationError, err:
#LOG("ListBox ValidationError",0,str(err)) #LOG("ListBox ValidationError",0,str(err))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment