我的验证类看起来像这样
<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class PaymentRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
$rules = array(
'invoiceid'=>'required',
'recieved_amount'=>'required',
'ref_no'=>'required',
'date'=>'required',
'comment'=>'required'
);
}
}
我希望验证recieved_amount
是否为货币字段,如果输入了除货币以外的内容,则应进行验证。
有人能帮我吗?