I have a drop down that contains different task names. When the end user selects the "Help Desk" from "project_names" then "task_names" has to be 9 numbers long.

This is my current code for validation:

sub _validate_taskform {
    my $self = shift;

    return {
        required => [
qw/user_name clin_id charge_ids project_names start_date end_date total_hours/
        ],
require_some => { task_or_add_task => [ 1, qw/task_names add_task/ ] },
        filters     => ['trim'],
constraints => { total_hours => qr/^(\d*(\.((00?)|(25)|(50?)|(75))0*)?)$/, },
        msgs => {
            any_errors => 'err__',
            prefix     => 'err_',
            missing    => '',
        }
    };
}


Any thoughts?

Robert
--
"Any moment now, unspeakable horror!" - Crow T Robot


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to