vjdj
(Abcde444)
1
Hi.
I am looking for a validator to check the max value in field forms.
I try but doesn’t work
<?= $form->field($model, 'top_name_probability')->input('number', ['min'=>0,'max'=>1]) ?>
and
<?= $form->field($model, 'top_name_probability')->textInput(['min'=>0,'max' => 1]) ?>
Put this in your model rules:
public function rules()
{
return [
['top_name_probability', 'string', 'max' => 50],
.
.
.
In your View:
<?= $form->field($model, 'top_name_probability')->textInput(['maxlength' => true]) ?>
vjdj
(Abcde444)
3
Thank you, exactly what it was