Skip to content

Commit

Permalink
Small code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Borales committed Mar 16, 2016
1 parent 74c8f54 commit 25e2df5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/PhoneInputValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ public function clientValidateAttribute($model, $attribute, $view) {

$telInputId = Html::getInputId($model, $attribute);
$options = Json::htmlEncode([
'message' => Yii::$app->getI18n()->format($this->message, [
'attribute' => $model->getAttributeLabel($attribute)
], Yii::$app->language)
'message' => Yii::$app->getI18n()->format($this->message, [
'attribute' => $model->getAttributeLabel($attribute)
], Yii::$app->language)
]);

return <<<JS
var options = $options,
telInput = $("#$telInputId");
if($.trim(telInput.val())){
if(!telInput.intlTelInput("isValidNumber")){
messages.push(options.message);
}
}
var options = $options, telInput = $("#$telInputId");
if($.trim(telInput.val())){
if(!telInput.intlTelInput("isValidNumber")){
messages.push(options.message);
}
}
JS;
}
}

0 comments on commit 25e2df5

Please sign in to comment.