Custom Validation Executed - Blank Screen Displays [message #678] |
Wed, 14 March 2007 02:17 |
douglas
Messages: 9 Registered: August 2006 Location: Kerala
|
Junior Member |
|
|
I have created a class for custom validation and executes properly. The thing is, I am getting only a blank screen after the update. I have to be login again for continue. The record is updated after proper validation. The class i created if as follows. I have updated the concerned column in the data dictionary as
SubType=CUSTOM
custom validation = douglas.validation.class.inc/douglas_validation_class/source _id
The class is as follows
<?php
class douglas_validation_class
{
function source_id (&$input, $fieldspec)
{
$input = strtoupper($input);
if (!empty($input)) {
$pattern = "^[A-Z]{1,2}$";
if (!ereg($pattern, $input)) {
return getLanguageText('validation001');
}
}
return;
} // source_id
} // end class
Kindly inform me what has happened wrongly.
Thanking u sir,
Douglas
?>
Douglas
|
|
|
|