$cust = \Validation::factory("customer"); $cust->add_field('title', 'Title', 'required'); $cust->add_field('firstname', 'Firstname', 'required'); $cust->add_field('lastname', 'Lastname', 'required'); $ben = \Validation::factory("ben"); $ben->add_field('ben_title', 'Title', 'required'); $ben->add_field('ben_name', 'Name', 'required'); $pay = \Validation::factory("pay"); $pay->add_field('payment_method_id', 'Payment method', 'required'); $pay->add_field('payment_account_no', 'Account', 'required'); if (\Input::method() == 'POST' && $cust->run() && $pay->run() && $ben->run()) { } \Session::set_flash('validation', $cust->show_errors()); \Session::set_flash('ben', $ben->show_errors()); \Session::set_flash('pay', $pay->show_errors());
It looks like you're new here. If you want to get involved, click one of these buttons!