-
Notifications
You must be signed in to change notification settings - Fork 32
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
Allow function as parameter of setOptionValidator() & setBodyValidator() #60
Comments
-Assigned:
+Assigned: Kubo2 just to not forget about this one |
Kubo2
added a commit
to Kubo2/jBBCode
that referenced
this issue
Jul 28, 2015
…loses jbowens#60] From this commit, it is possible to: - pass either InputValidor or a callable to both: - CodeDefinitionBuilder::setOptionValidator() - CodeDefinitionBuilder::setBodyValidator() - wrap any method or function into JBBCode\validators\CallableValidatorAdapter without need to manually implement InputValidator (this is also what internally CodeDefinitionBuilder does)
3 tasks
Kubo2
added a commit
to Kubo2/jBBCode
that referenced
this issue
Jul 28, 2015
…loses jbowens#60] From this commit, it is possible to: - pass either InputValidor or a callable to both: - CodeDefinitionBuilder::setOptionValidator() - CodeDefinitionBuilder::setBodyValidator() - wrap any method or function into JBBCode\validators\CallableValidatorAdapter without need to manually implement InputValidator (this is also what internally CodeDefinitionBuilder does)
Kubo2
added a commit
to Kubo2/jBBCode
that referenced
this issue
Jul 28, 2015
…loses jbowens#60] From this commit, it is possible to: - pass either InputValidor or a callable to both: - CodeDefinitionBuilder::setOptionValidator() - CodeDefinitionBuilder::setBodyValidator() - wrap any method or function into JBBCode\validators\CallableValidatorAdapter without need to manually implement InputValidator (this is also what internally CodeDefinitionBuilder does)
Kubo2
added a commit
to Kubo2/jBBCode
that referenced
this issue
Jul 28, 2015
…ator()/setBodyValidator(), closes jbowens#60
Kubo2
added a commit
to Kubo2/jBBCode
that referenced
this issue
Jul 28, 2015
…ator()/setBodyValidator(), closes jbowens#60
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need a number validator(for a [size] tag).
I would be very nice to be able to do a simple
setOptionValidator('is_numeric');
rather than having to wrap is_numeric() inside a class just to use it in this context
Would also allow for anonymous function as argument
setOptionValidator(function($input) { return is_numeric($input) });
The text was updated successfully, but these errors were encountered: