[Custom Input Masks] Issue when Option KeepMask is set to false and component Refresh
Web icon
Forge component by Sara Gonçalves


I was using this component and notice that every time I refreshed the component and input after an ajax submit with client validation, the value that is being submitted in that input is 100x bigger than the original value.

For my analysis, the action is being performed twice for the same submit, which generates this bug.


This action is being executed when the client form validation function is executed and before submit, both

        var Base_OsPage_ClientValidate = OsPage_ClientValidate;
        OsPage_ClientValidate = (function (srcElement, cleanOnlySrcElementErrors) {
            var result = Base_OsPage_ClientValidate(srcElement, cleanOnlySrcElementErrors);
            $(elementID).inputmask(mask, maskOpts);
            return result;

        osAjaxBackend.BindBeforeSubmit(function () {

And I thought invoking that action twice was making this happening, but the issue is generated by invoking 

        $(elementID).inputmask(mask, maskOpts);

I edited the component, and the issue was fixed by removing that code line from the validation function.


João Franco

Thanks I have to face these issue.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.