29 lines
527 B
PHP
29 lines
527 B
PHP
<?php
|
|
|
|
namespace App\Http\Requestes;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class RiceShrimpPriceUpdateRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'price' => ['required', 'regex:/^([1-9]\d*|0)(\.\d{1,2})?$/'],
|
|
];
|
|
}
|
|
|
|
public function attributes()
|
|
{
|
|
return [
|
|
'price' => '价格',
|
|
];
|
|
}
|
|
}
|