fixed validation
This commit is contained in:
parent
f0dd991d1e
commit
d670a46c32
|
|
@ -35,7 +35,17 @@ class TaxRateRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'name' => 'required|string|max:10',
|
'name' => 'required|string|max:10',
|
||||||
'rate' => 'required|numeric',
|
'rate' => 'required|numeric',
|
||||||
'type' => 'required|'
|
'type' => 'required|in:percent,flat',
|
||||||
|
'region_id' => 'required|int',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function attributes()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => trans('validation.attributes.tax_rate.name'),
|
||||||
|
'rate' => trans('validation.attributes.tax_rate.rate'),
|
||||||
|
'type' => trans('validation.attributes.tax_rate.type'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,12 @@ return [
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'descriptions.en.title' => 'Title',
|
'descriptions.en.title' => 'Title',
|
||||||
'descriptions.zh_cn.title' => 'Title',
|
'descriptions.zh_cn.title' => 'Title',
|
||||||
|
|
||||||
|
'tax_rate' => [
|
||||||
|
'name' => 'Tax Rate Name',
|
||||||
|
'type' => 'Tax Type',
|
||||||
|
'rate' => 'Tax Rate',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,12 @@ return [
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'descriptions.en.title' => '英文标题',
|
'descriptions.en.title' => '英文标题',
|
||||||
'descriptions.zh_cn.title' => '中文标题',
|
'descriptions.zh_cn.title' => '中文标题',
|
||||||
|
|
||||||
|
'tax_rate' => [
|
||||||
|
'name' => '税种名称',
|
||||||
|
'type' => '类型',
|
||||||
|
'rate' => '税率',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue