How to validate dojo TextBox based on regEx after completion of typing -


i have use case need match string based on regex. input in dojo validationtextbox have add regex match particular string. string matched bandwidths. eg: 100 mbps, 1 gbps, 10 kbps, etc. regex works: [1-9][0-9]*[ ][m|k|g|t][b][p][s]

however, validation textbox throws error , when start typing since string not yet complete. supposing, value want add "100 mbps", moment enter '1', error shown since regex not matched.

how can make textbox validate after finish typing?.

we used use our own library on top dojo. found solution checking whether entered string substring of regex (starting left most) each time user entered character , once focus removed, check whole string regex.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -