Welcome Guest, Not a member yet? Register   Sign In
Want to use config array, but need variable as validated field
#1

[eluser]Calvin Froedge[/eluser]
I have a custom functions for checking unique & existing values. They get passed from my model for the current (in this case, coupon).

Code:
$this->form_validation->set_rules('coupon_name', $this->lang->line('coupons_form-add-coupon-label-coupon-name'), 'trim|required|min_length[5]|max_length[45]|xss_clean|unique[subscription_coupons.coupon_name.'.$coupon_info->coupon_name.']');

I have moved all my other validation rules to my config file, and I'd like to move these too. I think my only option is to call my model in my config file, but that seems really dirty. Any thoughts?
#2

[eluser]Calvin Froedge[/eluser]
Bump...Anybody?




Theme © iAndrew 2016 - Forum software by © MyBB