There is only one way.. you must check if that id exists wherever you are saving it... and you can verify in many ways... ie. ajax, or on form submit. In your case, follow the formhandler docs and you will find a section where it validates the form... in that point, you can show the error to your user: 'username already registred'
On Mon, Jun 3, 2013 at 11:31 AM, Carl Franks <[email protected]> wrote: > Hi, > > On 2 June 2013 12:33, Bjørn-Helge Mevik <[email protected]> wrote: > > > model: DB::OpusTwikiBrukernavn > > > 'resultset' is not defined at /home/bhm/perl5/lib/perl5/HTML/FormFu.pm > line 498. > > HTML::FormFu::Model::DBIC can retrieve the DBIC schema when you set > either 'schema', > or both 'context' and 'model', > or just 'context' by calling for its default model. > > resultset() must always be set - so you can't just pass the entire > resultset name to 'model'. > > Try this config instead of the single 'model' above: > > model: DB > resultset: OpusTwikiBrukernavn > > > > Use of uninitialized value $name in pattern match (m//) at > /home/bhm/perl5/lib/perl5/HTML/FormFu/Element.pm line 71. > > Use of uninitialized value $root in hash element at > /home/bhm/perl5/lib/perl5/HTML/FormFu/Role/NestedHashUtils.pm line 43. > > I don't think this is also immediately linked to your error, but it > indicates that you're using a field element without a name - this is > unsupported by FormFu, and may cause other errors. > > Carl > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ >
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
