Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Unassigned: MaskedEditExtender and validator [27784]

$
0
0
There seems to be major issues with validation of the MaskedEditExtender.

We were previously using an older version of the toolkit. We have many inputs with MaskedEditExtenders attached to them. We were previously doing validatoin on lots of these fields using standard CustomValidators and this worked fine.

However when we upgraded to V15.1, when validation was fired, the validation appeared to get stuck in a loop and the screen would flicker endlessly and the browser become unresponsive.

We've started migrating these CustomValidators to MaskedEditValidators and this stops the looping issue.

However this uncovers a more fundamental issue. The first time validation is performed ie. when the input loses focus, the value that is passed into the validation function is literally the characters that the user has entered. However when Page_ClientValidate is called, foor example when the user hits the submit button, the value that is passed into the validation function is now the user input formatted with the input mask.

For example if you have a masked input for a telephone number such that the user enters 5555555555 but with the mask on the input it's formatted as (555) 555 - 5555, when the input loses focus and validation is called, the value that is passed into the validation function is "5555555555". Howwever when they hit the submit button, the value that is passed into the validation function is "(555) 555 - 5555". Obviously this breaks any regexes etc etc.

For now I've had to revert to an old version of the toolkit.

Viewing all articles
Browse latest Browse all 4356

Trending Articles