I have the following in my validation script:

    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/ ] },
        dependencies => {
            "project_names" => {
"ICGS LIMS Help Desk Tickets" => { task_names => qr/^\d{9}$/, },
             },
        },
        filters     => ['trim'],
constraints => { total_hours => qr/^(\d*(\.((00?)|(25)|(50?)|(75))0*)?)$/, },
        msgs => {
            any_errors => 'err__',
            prefix     => 'err_',
            missing    => '',
        }
    };


I had a user select the "ICGS LIMS Help Desk Tickets" item in the project_names but he didn't select a corresponding ticket number he selected something else. It should have (in my mind) gone back to the page with an error but instead my form tried to insert the bogus stuff and a database error was throw to the web page. I am thinking it might be how the "required_some" works or I set it up wrong.

Any thoughts?

Robert


---------------------------------------------------------------------
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