Your translator may be getting called but I don't think that's how the rest of the min/max validators are going to use the value. Each one independently checks the value of the field in question, so if you wanted to translate the value beforehand you should set the fields value instead of returning it.
The only thing dojo will check in your return is the javascript/c equivalent of boolean - so really you should be returning true or false . On 5/1/07, Tony Nelson <[EMAIL PROTECTED]> wrote:
If a TextField has both a translator and validators defined, is the input passed from the validators the output of the translators? I have been trying to get something like this working in 4.1.2 (todays snapshot) that worked fine in 4.0. <input jwcid="@TextField" value="ognl:percent" validators="validators:required,min=1,max=100" translator="translator:percentTranslator" displayname="Percent Input"/> My percentTranslator is registering the dojo events necessary to call: translatePercentage:function(value) { dojo.log.warn("enter translatePercentage"); if(!value){return 0;} var result = parseFloat(value.replace(/%/,'')); dojo.log.warn("result=" + result); return result; } which simply strips any '%' signs out of the input value and returns a Float (which is probably unnecessary). When I submit my test form, I do see the log messages in Firebug as expected, and it definitely is returning the value without a % however I get a dojo validation popup that states the value is non-number, and does not meet the min/max criteria. Is there any way to find out what value is being passed to min/max? Thanks in advance for any help. Tony Nelson --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com