Skip to content

Commit b6befe4

Browse files
authored
Update FormHelper.php
1 parent d89a7a7 commit b6befe4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/helper/FormHelper.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function text(string $name,array $options = [], mixed $value = null)
7575
*/
7676
public function password(string $name, array $options = [])
7777
{
78-
$options = array_merge($options,['verify'=>'pass']);
78+
$options['verify'] = isset($options['verify'])?$options['verify']:'pass';
7979
return $this->input($name, 'password', $options);
8080
}
8181

@@ -118,7 +118,7 @@ public function hidden($name, $options = [],$value = null)
118118
*/
119119
public function email($name, $options = [],$value = null)
120120
{
121-
$options = array_merge($options,['verify'=>'email']);
121+
$options['verify'] = isset($options['verify'])?$options['verify']:'email';
122122
return $this->input( $name,'email', $options, $value);
123123
}
124124

@@ -133,7 +133,7 @@ public function email($name, $options = [],$value = null)
133133
*/
134134
public function tel($name, $options = [],$value = null)
135135
{
136-
$options = array_merge($options,['verify'=>'phone']);
136+
$options['verify'] = isset($options['verify'])?$options['verify']:'phone';
137137
return $this->input( $name,'tel', $options, $value);
138138
}
139139

@@ -148,7 +148,7 @@ public function tel($name, $options = [],$value = null)
148148
*/
149149
public function number($name, $options = [],$value = null)
150150
{
151-
$options = array_merge($options,['verify'=>'number']);
151+
$options['verify'] = isset($options['verify'])?$options['verify']:'number';
152152
return $this->input( $name,'number', $options, $value);
153153
}
154154

@@ -163,7 +163,7 @@ public function number($name, $options = [],$value = null)
163163
*/
164164
public function url($name, $options = [],$value = null)
165165
{
166-
$options = array_merge($options,['verify'=>'url']);
166+
$options['verify'] = isset($options['verify'])?$options['verify']:'url';
167167
return $this->input( $name,'url', $options, $value);
168168
}
169169

0 commit comments

Comments
 (0)