How to detect space Or Comma have in text box text last word

Hello Kodular .i am facing a problem in mysql database . i have a multiple choice quiz question table .but problem is if i have used any comma in word or space in word so the index no is mismatch .so i want disabled or show an error if i used any comma or space after last word in text box

Use when text box text change with if contai text