validate a textbox

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
Posts: 40
Joined: Tue Nov 19, 2019 1:17 am

validate a textbox

Post by klarlichter » Sun Nov 24, 2019 1:49 pm

I create a textbox.
It called for example $textbox1 .
How i can validate that user input a string like:


It is important that it start with " and end with " and if many values it need be each time use , between (like my examples above).

Posts: 14000
Joined: Tue May 22, 2007 9:57 am

Re: validate a textbox

Post by jvierra » Sun Nov 24, 2019 1:56 pm

For this you would want to use RegEx pattern matching in the "Validating" event.

Post Reply