![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Thanks Greg your code is fine.
However I just can't seem to get these regex to work in my other code: var st:String = addcurrencyInput.text; if(addcurrencyInput.text.length == 0){ Alert.show("You cannot add a blank currancy"); } else if(!st.search(new RegExp("/^[0-9]+$/"))){ Alert.show("The currancy may only contain alphabetical characters"); } else{ myService.addCurrency(addcurrencyInput.text); } the following line never gets excecuted regarless of the text inside st Alert.show("The currancy may only contain alphabetical characters"); |
|
|||
|
Just remember to always check the FB3 help sys for relevant aspects of the
problem at hand. I checked the return value for the search method of the String class. This is often how I solve these posts for people. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise