Passed
Push — master ( a6afd0...b1a13b )
by Oleg
05:01
created
validator/UrlValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function client(IFormModel $model)
46 46
     {
47
-        $javaScript = 'if (/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(this.value' .
47
+        $javaScript = 'if (/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(this.value'.
48 48
             ') != true) { e.preventDefault(); this.focus(); alert(\'Value is not a URL\'); }';
49 49
 
50 50
         return $javaScript;
Please login to merge, or discard this patch.
validator/RangeValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function client(IFormModel $model)
57 57
     {
58
-        return 'if (this.value < ' . $this->params['min'] . ' || this.value > ' . $this->params['max'] . ') {' .
58
+        return 'if (this.value < '.$this->params['min'].' || this.value > '.$this->params['max'].') {'.
59 59
             ' e.preventDefault(); this.focus(); alert(\'Value not find in range\'); }';
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
validator/EmailValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function client(IFormModel $model)
46 46
     {
47
-        return 'if (/^[\w.-]{1,}@[\w.-]{1,}$/.test(this.value) != true) {' .
47
+        return 'if (/^[\w.-]{1,}@[\w.-]{1,}$/.test(this.value) != true) {'.
48 48
             ' e.preventDefault(); this.focus(); alert(\'Value is not a valid e-mail\'); }';
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
validator/RegexpValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function client(IFormModel $model)
47 47
     {
48
-        return 'if (!this.value.match(' . $this->params['pattern'] . ')) {' .
48
+        return 'if (!this.value.match('.$this->params['pattern'].')) {'.
49 49
             ' e.preventDefault(); this.focus(); alert(\'Value not valid with regular expression\'); }';
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
validator/StringValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
         $javaScript = '';
60 60
 
61 61
         if (!empty($this->params['min'])) {
62
-            $javaScript .= ' if (this.value.length < ' . $this->params['min'] . ') { e.preventDefault(); this.focus();' .
62
+            $javaScript .= ' if (this.value.length < '.$this->params['min'].') { e.preventDefault(); this.focus();'.
63 63
                 ' alert(\'Value lowest, minimum '.$this->params['min'].' symbols\'); }';
64 64
         }
65 65
         if (!empty($this->params['max'])) {
66
-            $javaScript .= ' if (this.value.length > ' . $this->params['max'] . ') { e.preventDefault(); this.focus();' .
66
+            $javaScript .= ' if (this.value.length > '.$this->params['max'].') { e.preventDefault(); this.focus();'.
67 67
                 ' alert(\'Value highest, maximum '.$this->params['max'].' symbols\'); }';
68 68
         }
69 69
 
Please login to merge, or discard this patch.
validator/CompareValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
             $value = $model->$attribute;
69 69
         }
70 70
 
71
-        $javaScript = 'if (this.value!="' . $value . '") { e.preventDefault(); this.focus(); alert(\'Value is not compatible\'); }';
71
+        $javaScript = 'if (this.value!="'.$value.'") { e.preventDefault(); this.focus(); alert(\'Value is not compatible\'); }';
72 72
 
73 73
         return $javaScript;
74 74
     }
Please login to merge, or discard this patch.