[TYPO3-project-formidable] Changing data before saving
Oliver Klee
typo3-german-01 at oliverklee.de
Sat Dec 2 13:56:16 CET 2006
Hi all,
using formidable 0.5.0 plus the REG validator, I have a text renderlet
which looks like this:
<renderlet:TEXT name="price_regular">
<label>LLL:EXT:seminars/locallang_db.php:tx_seminars_seminars.price_regular</label>
<validators>
<validator:PREG>
<pattern>
<value>/^[\d]*((\.|,)[\d]{1,2})?$/</value>
<message>LLL:EXT:seminars/pi1/locallang.php:message_noPriceNumber</message>
</pattern>
</validator:PREG>
</validators>
</renderlet:TEXT>
As decimals can only be saved using "." as the decimal point, I'd like
to change all "," to "." before saving the data (e.g. using preg_replace).
How can I change the value before saving it to DB?
Thanks a lot in advance,
Oliver
More information about the TYPO3-project-formidable
mailing list