On Thu, Jan 8, 2009 at 4:57 PM, mk <[email protected]> wrote:
>
> Dalius Dobravolskas wrote:
>>> <input name="user3" value="${initstr}" />
>> There are helper functions that could simplify that. Like:
>> ${h.input('user3', value=initstr)}
>
> Hmm I'm getting SillyError(tm) now:
>
> AttributeError: 'module' object has no attribute 'input'
>
> ${h.input('user3', value=initstr)}
>
> I've created HelloWorld project per Pylons Book instructions, do I need
> to enable helpers explicitly somehow somewhere?
Right. Into project/lib/helpers.py add:
from webhelpers.html.tags import *
> class LessThan5(validatish.Validator):
> def __call__(value):
> if value is not None and value < 5:
> raise validatish.Invalid('less than 5')
>
> ...
>
> schemaish.Float(validator=LessThan5())
Nothing what you can't do with FormEncode. Try to write validator for
password match (like in registration form). If you can do that with
Formish you can use it.
--
Dalius
http://blog.sandbox.lt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---