Hi guys.
I use MaskedInput Widget for an ip address field.
$form->field($model, 'ip_address')->widget(MaskedInput::className(), [
'clientOptions' => [
'alias' => 'ip'
],
])
And i also use validator in models.
array(
'ip_address',
'app\components\validators\IpValidator',
'version' => 'ipv4',
'skipOnEmpty' => true
),
So its really simple. The validator in the model verifies a correct IP! The masked input widget is just a feature for the user.
The masked input widget can produce on a POST-Request following string for the field ip_address:
161.112.122.15_
And thats no valid ip address. The masked input widget doesn’t remove the traling underline.
I’ve got some other problems with the MaskedInput Widget for DecimalFormatted Numbers. But first the ip problem…
Thx.