[html-formfu] Validating unique names

Ton Voon ton.voon at altinity.com
Wed May 14 15:39:38 BST 2008


Hi!

We've just starting playing with FormFu with new Catalyst application  
and am impressed with how it works. However, one thing which I find  
hard is how to define a field as unique across all the existing rows.

For instance, we have a list of hosts and we need to ensure that the  
host name given in the form is unique. Obviously if the host is being  
edited and the name is the same, then the validator should pass.

It looks like a validator callback is the best way to do that, but I  
can't see how to integrate this with DBIx::Class. How do others do this?

Ton

http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon




More information about the HTML-FormFu mailing list