Ticket #359 (closed task: fixed)
Improve validators
| Reported by: | david | Owned by: | dominik |
|---|---|---|---|
| Priority: | high | Milestone: | 0.11 |
| Component: | validation | Version: | |
| Severity: | blocker | Keywords: | |
| Cc: | Patch attached: |
Description
- Add ability to cast types whereever feasible
- Integrate with i18n
Concrete tasks:
- Number Validation
- Allow "only int", "only float" or "both" modes
- Allow casting of values to int or float
- Make casting optionally disableable
- Automatically use the current locale information to parse values, i.e. "5,14" instead of "5.14" for German and others
- Allow overriding of the locale used to parse the information
- Allow disabling of automatic locale use
- Date/Time Validation
- Get rid of mktimestamp validator
- Build one validator for date, time and datetime validation
- Can parse from one field or multiple fields
- Can normalize values (d, m and y field to one value or other way round)
- Can cast values (to unix timestamp, to formatted string, to to Calendar object, maybe PHP 5.2 DateTime? object?)
- Automatically use the current locale information to parse values, i.e. "01.12.2006" instead of "12/01/06" for German
- Allow overriding of the locale used to parse the information
- Allow disabling of automatic locale use
- Allow specifying the name of a parameter given to each locale that contains a parse format string
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

