NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on July 01, 2009, 07:09:36 AM
-
Hi,
I need to validate a field, lets say, does not allow * character in a name.
You can try it modifying example 1
I add the following code to the Routines/Validate/Mailboxname
If Loc:Invalid <> '' then exit.
if instring('*',MAI:MailBoxName,1,1)>0
loc:Invalid = MAI:MailBoxName
loc:alert = 'MailBoxName:' & ' ' & p_web.Translate('you can''t use an * in the MailBoxName!')
END
But when you enter an * and press save, the upper red error line appears ok, but not the message box error.
Its weird because it is a required field and this validation is almost the same in the same place and the message box does appears.
What am I doing wrong?
Alberto
-
Alberto,
In the WebHandler procedure, there is an embed called ProcessLink.
The embed before Parent Call, I guess there is a statement: self._popUpDone = 1
This prevents the popup to appear.
If it is there and you comment it out, t\you will see the red text AND the alert box.
Rene
-
>> and press save
The save button runs different validation code, which validates the whole record. Specifically, at that point the validate::field routines are not called.
The validate::field routines are only called when the field is dynamically valiadated as it is entered.
So right-click-source and look for more validation code (I think routine is validaterecord, but I'm not sure offhand.)
Cheers
Bruce