Validade MaskedInput completely

Hi!,

How can i make a validator for not let me to save my info until i have completed all the number of characters? (using MaskedInput)


 

<?= $form->field($model, 'contact')->widget(\yii\widgets\MaskedInput::classname(), [

        	'mask' => ['(99)9999-9999'],

    	]) ?> 



Thanks

"match" validator will do.

http://www.yiiframework.com/doc-2.0/guide-tutorial-core-validators.html#match

http://www.yiiframework.com/doc-2.0/yii-validators-regularexpressionvalidator.html