Open CHOMNANP opened 8 years ago
Yes it is, what's the issue?
For example, I have a table with unique fields('project_id','employee_id'). So far, I found there is an option to use "$form->add('project_id', 'P ID' , 'select')->options(Project::All()->pluck('code', 'id'))->rule('required|unique);", but this only check for 1 field. Is there a way to check 2 unique fields.
Something like rule('required|unique:myTable,project_id|uniqueWith:myTable,employee_id'); Thanks.
rapyd uses the laravel native validator. i suggest you to check the laravel docs to see if it's possible or note. If not, you can still create a custom validation (again, check the laravel docs to learn how to), and use it with rapyd.
There are some Custom Validater available. I'll try and see. I'll update the ticket once I find the solution :)
Thank Tacone.
I'm trying to get my form validation more than 1 fields. Is it possible?
$form = \DataForm::source(new ProjectAssignment()); $form->add('project_id', 'P ID' , 'select')->options(Project::All()->pluck('code', 'id'))->rule('required); $form->add('employee_id', 'E ID' , 'select')->options(Employee::All()->pluck('name', 'id'))->rule('required');
Anyone experience with this?