[TYPO3-project-formidable] Create some custom renderlets, actionlets, .

Jérémy Lecour jeremy.lecour at gmail.com
Mon Jun 19 18:03:46 CEST 2006


> Thank you for this nice publication, Jeremy.
> Have you got some example on how tu use it ? ( I mean, some useful regex ? )

You can use any regular expression valid witth PREG syntax.

You already made a validator for e-mail adresses, but if it didn't
exist, you could have used a regex to validate them through this
validator.

I don't have any useful regex in mind. Many websites make searchable
libraries for ready-to-use regex, like : zip codes, web URLs, phone
numbers, Social Security numbers, …

It's important to give a full regex pattern to the validator,
including slashes, … I mean that if you want to check an numeric-only
value, you have to give make that :

<validator:PREG>
    <pattern>
        <value>/^[0-9]+$/</value>
        <message>The value is not numeric</message>
    </pattern>
</validator:PREG>

Maybe it could be a good idea to include this in the Main validator
class, because it is very generic and could be useful in many
situations.


-- 
Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
webdesigner, webmaster et développeur web
Trésorier du PLUG : Provence Linux User Group
http://www.plugfr.org/



More information about the TYPO3-project-formidable mailing list