|
Débuté par Piet van Zanten, 24 sep. 2008 01:56 - 5 réponses |
| |
| | | |
|
| |
Posté le 24 septembre 2008 - 01:56 |
Hi, Anybody got an input mask for ip numbers? Regards, Piet |
| |
| |
| | | |
|
| | |
| |
Posté le 24 septembre 2008 - 01:59 |
Hi Piet, MatchRegularExpression has an all made example in the wizard. (If this is what you meant in your question.) [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} Regards. |
| |
| |
| | | |
|
| | |
| |
Posté le 24 septembre 2008 - 02:01 |
Hi Alexandre, Thank you for the suggestion. I now have matchregularexpression working fine, but I cannot get the inputmask working. I use: Myself..InputMask="regexp:[0-9.]{4,15}" as suggested in the help. With this mask no characters can be typed at all. Best regards, Piet |
| |
| |
| | | |
|
| | |
| |
Posté le 24 septembre 2008 - 17:40 |
Hi Piet, This is because you require a minimum of 4 caracters and when you start you have none. So the input is wrong. You "must" accept a mask with 0 caracters, or at least provide a starting value which is valid. The InputMask is not good at validating, but is like a guide to help the user input data as required. This is an on going process. Best regards. |
| |
| |
| | | |
|
| | |
| |
Posté le 24 septembre 2008 - 17:42 |
Hi Piet...
if I remember correctly my regular expression, yours allow string between 4 and 15 long.... So when you type your first number, the string is only ONE long, and is incorrect
What I do generally in thos case is to put as mask something quite permissive (by example here it would be[0-9.]{1,15}) and then check in the field exit code with a precise expression if the result is ok (by the way, Alexandre gave you a much more precise expression that you can use)
Best regards
-- Fabrice Harari Consultant WinDev, WebDev et WinDev Mobile International
Plus d'information sur http://fabriceharari.com/index_FR.html
Piet van Zanten wrote:
Hi Alexandre, Thank you for the suggestion. I now have matchregularexpression working fine, but I cannot get the inputmask working. I use: Myself..InputMask="regexp:[0-9.]{4,15}" as suggested in the help. With this mask no characters can be typed at all. Best regards, Piet
|
| |
| |
| | | |
|
| | |
| |
Posté le 24 septembre 2008 - 23:57 |
Thanks guys, again I learned something, it works now as expected. Best regards, Piet |
| |
| |
| | | |
|
| | | | |
| | |
|