Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Validate for Number Input only


2 replies to this topic

ranjit

ranjit
  • Members
  • 19 posts

Posted 24 July 2002 - 00:15

HI,
I have a standred project(7.0x) and a coustom dialog.I have an edit boxs similar to IP address, all I wanted to konw is , how to verify if the user is entering only numbers instead of text.

thanks in advance for you time and thoughts

ranjit

Irina

Irina
  • Members
  • 227 posts

Posted 30 July 2002 - 21:30

Hi,
You can set a property to handle a text from your edit box, like IPADDRESS, then create a custom action to validate this property. It may be C code or VB script which should validate this string (e.g. to compare ASCII code of characteristics). This validation custom action will set a VALIDATE property as "Yes", if this string was entered correctly, or "No" otherwise. After this you can use the VALIDATE property as a condition on the Next button, or whatever you want.
Irina Shirinsky
Software Engineer, Heroix Corporation
http://www.heroix.com

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 31 July 2002 - 08:58

You may find the masked edit control useful here.

A mask such as "<###.###.###.###>" might be ok for an IP Addresss.

You still need a CA to verify that the IP Address is valid.  You may also need routines to convert the address between canonical forms.
Ian Blake
(Currently Unemployed)