📜  浮点数的 laravel 验证类型 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:50.828000             🧑  作者: Mango

代码示例1
//For float, must use numeric validator

/**
  * Get the validation rules that apply to the request.
  *
  * @return array
 */
public function rules()
{
  return [
    'field' => 'numeric'
  ];
}