03 May 2022
in reply to
Missing user
Link to this post
Hello Charlotte,
Mike's suggestion is definitely the best answer for your 2nd issue. Removing those options from the advanced settings would also cause the widget to not accept those file types. Removing that line from the template is the way to go.
As for your first issue, what is occurring is validation on blur of that field. Unfortunately turning off validationOnBlur and even returning true from validateInput event doesn't seem to stop this behavior. I will keep looking into this as I can agree that it would be desirable to not have the validation occur immediately (or at least have the option).
While I investigate, you can use the following code snippet to catch the validateInput event and see if you can come up with any ideas:
tpc.forms[0].$$instance.get_kendoValidator().bind("validateInput", function (e) {
console.log(e);
if(e.input.is("[data-tpc-role='file-upload-input']")){
e.sender.validate = function ()
{ return true; };
e.sender.validateInput = function (input)
{ return true; };
}
});
The above will log the event object, the input is the validated field and the sender will be the entire form. You can see where I tried to return true for both the validate and validateInput event, with no luck.
I will keep you updated with my progress,
Brady
TPC Web Developer