Skip to content

Commit

Permalink
better validation for common string
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Feb 13, 2022
1 parent 1247b98 commit 4c595c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/enums/LitCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ public static function POSSESSIVE( string $value ) : string {
];

public static function isValid( string $value ) {
if( strpos($value, ',') || strpos($value, ':') ) {
$values = preg_split('/[,:]/', $value);
return self::areValid( $values );
}
return in_array( $value, self::$values );
}

Expand Down

0 comments on commit 4c595c1

Please sign in to comment.