Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

How to restrict text input to alphanumeric characters?

cdfizz17
2022-02-15
2022-03-22
  • cdfizz17 - 2022-02-15

    Hi,

    I see that you can set the 'min length' and 'max length' for a text input, but how can I restrict a user on the webvisu from typing in special characters?

     
  • TimvH

    TimvH - 2022-03-21

    Probably the best solution is to create your own Dialog library with a keyboard which only contains the characters you allow to use. See the installation folder of CODESYS where you can find a VisuDialogs.library which you can use as base for your own library: C:\Program Files\CODESYS 3.5.17.30\CODESYS\Projects\Visu\Dialogs

     
  • cdfizz17 - 2022-03-21

    This is extremely helpful, thank you. How would you solve this problem on a system using a physical keyboard? I suspect you would need to create a POU to validate the inputs.

     

Log in to post a comment.