I guess you added an IValidator to the text field validating the input for
US zip before, both remove it from the component when this is not the
country being informed, or provide an IValidator aware of the
selected country, as your textfield already are: determining the converter
to be used based on selected country.

On Thu, Feb 3, 2011 at 8:24 PM, Doug Leeper <douglee...@yahoo.com> wrote:

> I have created a custom zip text field that validates against several
> country
> formats, i.e. US and Canada.  I have created specific country converters
> and
> validators that are utilized by this custom zip field.
> In my test scenario, I have a valid US address displayed.
> I then change the country that has a AjaxFormComponentUpdatingBehavior
> which
> sends back the zip and state fields.  Note: zip field has a model reference
> of
> the country value which determines which validator/converter to use.
> I change the zip to be a valid Canadian zip (A#A #A#) and submit the
> changes.
> In my debug statements, I see the new value is parsed and validated with no
> error detected.
> But what is interesting, the previous US zip value is also being validated
> which
> causes an unexpected.
> Where did this zip value come from?  Did I forget to change/refresh a
> value/component?
> Any help is much appreciated.
> Thanks
> - Doug

Pedro Henrique Oliveira dos Santos

Reply via email to