Invalid input event

Posted by: wimaso6757 on 26 December 2022, 11:58 pm EST

    • Post Options:
    • Link

    Posted 26 December 2022, 11:58 pm EST

    I have the projects where I need to check for some invalid inputs in my controls on the page, so for that I was making the invalidInput event set in for my control but I can’t as maybe due to not clear understanding of how to set this. Kindly share some demo of setting invalidInput event in Angular and Vue both.

    Merci

    MinnieJ.

  • Posted 27 December 2022, 10:16 pm EST

    Hi,

    The ‘invalidInput’ event is triggered when the user types or pastes a value that cannot be converted to the proper type, or a value that is outside the valid range. For example try to copy and paste a string in input number control in the attached samples, to trigger the ‘invalidInput’ by default. For more information about the ‘invalidInput’ input, please refer to the following link - https://www.grapecity.com/wijmo/api/classes/wijmo.control.html#invalidinput

    If you want to use this event to validate your data based on some custom checks, you can handle the ‘textChanged’ event of the input control to check the data and trigger the ‘invalidInput’ event manually.

    Please refer to the following samples for the same -

    Angular sample - https://jscodemine.grapecity.com/share/tTG8MUtq0EKVrG3RQsR44g/

    Vue sample - https://jscodemine.grapecity.com/share/sxa3yIKSxEe0tnKe6OAghQ/

    In case, you are using flexGrid control, then you can use the ‘getError’ property of the collection view to validate the edits.

    Please refer to the following sample for it’s implementation - https://www.grapecity.com/wijmo/demos/Grid/Editing/CollectionViewValidation/angular

    Regards,

    ~ Vivek

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels