On Jul 9, 12:29 pm, Maciej Katafiasz <[email protected]> wrote:

> I've hit a roadblock trying to define validation for a view. No matter
> what kind of return values I return, the thing won't work. There's no
> documentation I could find, and grepping the source only turns up
> examples that don't feel like working for me. So, how are per-view
> validator functions meant to be used?

Here's a simple working example from one of my applications:

(defview quarter-chooser-form-view (:type form :persistp nil
                                    :satisfies (lambda (&key begin
end)
                                                 (or (and begin end
(quarter<= begin end))
                                                     (values nil "Das
Ende des Zeitraums muß größer als der Beginn sein."))))
  (begin :label "Von" :parse-as quarter :reader (f_ (format-quarter
(slot-value _ 'begin))))
  (end :label "Bis" :parse-as quarter :reader (f_ (format-quarter
(slot-value _ 'end)))))

Does that already help you?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" 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/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to