Closed alxlnk closed 1 month ago
@alxlnk Could you clarify: was this still working on 2.0.49 and is this a regression? Or was it already broken?
@marcovtwout My last update Yii is from 2.0.49.3
to 2.0.50
. 2.0.49.3
version require "bower-asset/inputmask": "~3.2.2 | ~3.3.5"
and regex with alias works in MaskedInput widget, but 2.0.50
require "bower-asset/inputmask": "^5.0.8 "
and it broken my previous widget config.
PR #20212 already merged and resolve configuration issue.
To work correctly in version 2.0.50
you need to use the following widget configuration:
[
'aliases' => [
'regex' => [
'regex' => '^.*$',
],
],
'clientOptions' => [
'alias' => 'regex',
],
]
but more simplify and valid is
[
'clientOptions' => [
'regex' => '^.*$',
],
]
What steps will reproduce the problem?
Upgrade Yii to 2.0.50 version
What is the expected result?
Masked input with regex must work
What do you get instead?
MaskedInput initialization throws error
Additional info
jquery: 3.6.4 inputmask: 5.0.8
https://jsfiddle.net/4jx0pqgw/
Need to add the
regex
parameter to required list in initialization.