Thread Datenvalidierung mit Transaktion - Wie am besten Ablauf verketten? (10 answers)
Opened by sid burn at 2009-05-29 14:17

pktm
 2009-05-29 16:39
#122078 #122078
User since
2003-08-07
2921 Artikel
BenutzerIn
[Homepage]
user image
Hallo!

Nur so gefragt, was gefällt die Data::FormValidator nicht?
Man kann dort alles von einfach bis hin zu komplexen validationsprofilen erstellen und prüfen. Außerdem gibt es eine Message-Methode, die die jeweiligen Fehlermeldungen benannter Constraints sammelz. Man kann sogar das hier:
Quote
If the built-in message generation doesn't suit you, it is also possible to provide your own by specifying a code reference:
msgs => \&my_msgs_callback

This will be called as a Data::FormValidator::Results method. It may receive as arguments an additional hash reference of control parameters, corresponding to the key names in the usually used in the msgs area of the profile. You can ignore this information if you'd like.

If you have an alternative error message handler you'd like to share, stick in the Data::FormValidator::ErrMsgs name space and upload it to CPAN.


Es gibt auch die Möglichkeit, mehrere Constraints für 1 Feld zu definieren:
Quote
Multiple constraints can be applied to a single field by defining the value of the constraint to be an array reference. Each of the values in this array can be any of the constraint types defined above.
http://www.intergastro-service.de (mein erstes CMS :) )

View full thread Datenvalidierung mit Transaktion - Wie am besten Ablauf verketten?