Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4 :: Add new regexp sanitizer type #5

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gustavonecore
Copy link
Owner

No description provided.

/**
* Class to sanitize regular expressions
*/
class TypeRegexp implements TypeInterface
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change name to AcmeClass

@@ -75,7 +76,7 @@ public function getType($rule, string $fieldName = '') : TypeInterface
case 'datetime' : $type = new TypeDatetime; break;
case 'double' : $type = new TypeDouble; break;
case 'email' : $type = new TypeEmail; break;
default: throw new InvalidArgumentException('Invalid type ' . $rule);
default: $type = $this->getCustomSanitizer($rule);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this function public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant