Я хочу применить числовую проверку для поля ввода формы. Я использую отдельный класс запроса для этого. Я пытался somtimes nullable
Но они не дали мне ответа. Даже если я не применил проверку required
, поле не пусто. Я показываю некоторые вопросы, связанные с этой проблемой. Но они не дали ответа. я использую laravel 5.7.28
Правило, которое я использую, ниже
{
$rules = [
'transaction_rate_type' => ['required'],
'discount_in_percentage' => ['numeric', 'between:0,99.99'],
'account_type' => ['required'],
];
return $rules;
}
migration is
public function up()
{
Schema::create('billing_programmes', function (Blueprint $table) {
$table->increments('id');
$table->integer('transaction_rate_type');
$table->decimal('discount_in_percentage');
$table->integer('account_type');
$table->uuid('created_by');
$table->uuid('updated_by');
$table->foreign('transaction_rate_type')->references('id')->on('transaction_rate_types');
$table->foreign('created_by')->references('id')->on('users');
$table->foreign('updated_by')->references('id')->on('users');
$table->timestamps();
});
}