Skip to content

Commit 8b693ce

Browse files
committed
update
1 parent b457797 commit 8b693ce

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class EmailValidator implements Validator
5+
class Email implements Validator
66
{
77
protected string $message = 'Invalid email address';
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class ExpressionValidator implements Validator
5+
class Expression implements Validator
66
{
77
protected string $comparator;
88
protected string $value;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class IntegerValidator implements Validator
5+
class Integer implements Validator
66
{
77
protected string $message = 'Must be a whole number';
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class MaxLengthValidator implements Validator
5+
class MaxLength implements Validator
66
{
77
protected int $maxLength;
88
protected string $message = 'Exceeds maximum length';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class MinLengthValidator implements Validator
5+
class MinLength implements Validator
66
{
77
protected int $minLength;
88
protected string $message = 'Exceeds minimum length';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class RegexValidator implements Validator
5+
class Regex implements Validator
66
{
77
protected string $pattern;
88
protected string $message = 'Invalid format';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class RequiredValidator implements Validator
5+
class Required implements Validator
66
{
77
protected string $message = 'Field is required';
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MintyPHP\Form\Validator;
44

5-
class UrlValidator implements Validator
5+
class Url implements Validator
66
{
77
protected string $message = 'Invalid URL';
88

src/Validator/Validators.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Validators
66
{
77
public static function required(string $message = ''): Validator
88
{
9-
$validator = new RequiredValidator();
9+
$validator = new Required();
1010
if ($message) {
1111
$validator->message($message);
1212
}
@@ -15,7 +15,7 @@ public static function required(string $message = ''): Validator
1515

1616
public static function email(string $message = ''): Validator
1717
{
18-
$validator = new EmailValidator();
18+
$validator = new Email();
1919
if ($message) {
2020
$validator->message($message);
2121
}
@@ -24,7 +24,7 @@ public static function email(string $message = ''): Validator
2424

2525
public static function url(string $message = ''): Validator
2626
{
27-
$validator = new UrlValidator();
27+
$validator = new Url();
2828
if ($message) {
2929
$validator->message($message);
3030
}
@@ -33,7 +33,7 @@ public static function url(string $message = ''): Validator
3333

3434
public static function integer(string $message = ''): Validator
3535
{
36-
$validator = new IntegerValidator();
36+
$validator = new Integer();
3737
if ($message) {
3838
$validator->message($message);
3939
}
@@ -42,7 +42,7 @@ public static function integer(string $message = ''): Validator
4242

4343
public static function expression(string $comperator, string $value, string $message = ''): Validator
4444
{
45-
$validator = new ExpressionValidator($comperator, $value);
45+
$validator = new Expression($comperator, $value);
4646
if ($message) {
4747
$validator->message($message);
4848
}
@@ -51,7 +51,7 @@ public static function expression(string $comperator, string $value, string $mes
5151

5252
public static function minLength(int $minLength, string $message = ''): Validator
5353
{
54-
$validator = new MinLengthValidator($minLength);
54+
$validator = new MinLength($minLength);
5555
if ($message) {
5656
$validator->message($message);
5757
}
@@ -60,7 +60,7 @@ public static function minLength(int $minLength, string $message = ''): Validato
6060

6161
public static function maxLength(int $maxLength, string $message = ''): Validator
6262
{
63-
$validator = new MaxLengthValidator($maxLength);
63+
$validator = new MaxLength($maxLength);
6464
if ($message) {
6565
$validator->message($message);
6666
}
@@ -69,7 +69,7 @@ public static function maxLength(int $maxLength, string $message = ''): Validato
6969

7070
public static function regex(string $pattern, string $message = ''): Validator
7171
{
72-
$validator = new RegexValidator($pattern);
72+
$validator = new Regex($pattern);
7373
if ($message) {
7474
$validator->message($message);
7575
}

0 commit comments

Comments
 (0)