Feature #11291
closed
Change validators to make use of filter_var() if possible
Added by Patrick Broens almost 14 years ago.
Updated almost 9 years ago.
Description
Problem:
Since PHP 5.2 we have the filter_var() function, which is not used in the validators. This makes it more easy to validate certain things, instead of using own methods.
Solution:
Replace own methods with filter_var() if possible
- Project changed from 135 to TYPO3 Core
- Category deleted (
Validation)
- Category set to Form Framework
- Target version set to 4.7.0
- PHP Version set to 5.3
- TYPO3 Version set to 4.6
all below typo3/sysext/form/Classes/System/Filter/ which is then used in the Validators under typo3/sysext/form/Classes/System/Validate/ for comparison
if ($this->filter->filter($value) !== $value) {
return FALSE;
}
Does this make things easier? We need the filters anyway afaik and using them makes sure filtering and validation follows the exact same rules imho.
- Target version deleted (
4.7.0)
- Target version set to 7.5
- Category changed from Form Framework to 1602
- Category changed from 1602 to Form Framework
- Target version deleted (
7.5)
- Status changed from New to Needs Feedback
- Assignee changed from Patrick Broens to Ralf Zimmermann
Do we still need this ticket since the rewrite?
- Assignee changed from Ralf Zimmermann to Björn Jacob
The filter logic is not touched at this time, so this ticket could be interesting.
- Status changed from Needs Feedback to New
- Assignee deleted (
Björn Jacob)
- Target version set to 8 LTS
- Status changed from New to Closed
- Target version deleted (
8 LTS)
- PHP Version deleted (
5.3)
It would be better to rewrite the validators and base them on extbase. See #72869.
Also available in: Atom
PDF