1
0

More than 1 year has passed since last update.

php バリデーションルール

Posted at

電話番号
'phone_number' => ['required', 'regex:/^\d{2,5}-?\d{1,4}-?\d{4}$/', 'between:10,13'],

チェックボックス一つ以上選択

            $target_type_rules = [
                'section1.is_full_time_employee' => 'required_without_all:section1.is_contract_employee,section1.is_part_timer,section1.is_part_time_job,section1.is_part_time_employee,section1.is_employment_type_other',
            ];
            $target_type_messages = [
                'section1.is_full_time_employee.required_without_all' => '職種を一つ以上選択してください'
            ];
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0