PDA

View Full Version : [FIXED] [V0.5.3] 0.5.3 TextField Validation Broken



Timothy
Jul 03, 2008, 4:33 PM
http://forums.ext.net/showthread.php?threadid=832-4-1.aspx

As mentioned here, validation for TextFields happens on page load instead of on validation action.

Cheers,
Timothy

geoffrey.mcgill
Jul 04, 2008, 3:42 AM
Thanks for reporting the bug.

This bug was caused from the fixing of another bug, see http://forums.ext.net/showthread.php?threadid=622-5-1.aspx

I'll have to chew on this overnight to try and come up with a fix/workaround.

Timothy
Jul 04, 2008, 8:55 AM
You got to love those ones ;)

Cheers,
Timothy

geoffrey.mcgill
Jul 05, 2008, 2:17 AM
I fixed the bug and also found a temp work-around which will help solve the problem before the next release.

If the you call the .Reset() Method of the TextField, it will clear the Validation message.

Example


protected void Page_Load(object sender, EventArgs e)
{
this.TextField1.Reset();
}

The permanent fix involved changing removing the "value" property from the client config object and instead call the .SetRawValue Method. This fix solves both this bug and the earlier "empty .Text" bug as linked above.

Example


this.SetRawValue(this.Text);

The fix was applied to the TextField, TextArea, NumberField and DateField controls.

Hope this helps.

Timothy
Jul 05, 2008, 3:14 AM
Great thanks! Looking forward to 0.5.4 ;)