[development] CCK in Drupal 6
dopry at thing.net
Wed Feb 7 20:45:24 UTC 2007
On Wed, 2007-02-07 at 22:11 +0200, adrian rossouw wrote:
> On 07 Feb 2007, at 8:56 PM, Darrel O'Pry wrote
> > This can be overcome with a few simple #validate functions on form
> > elements correct?
> There are definitely 2 steps involved here.
> widgets do processing on the input, to change it into the right data
> type. (this is how i felt checkboxes/ select lists should have been
> handled, not by being hardcoded in form_builder)
> fields validate the data that they have been given, whether by code or
> by the widgets.
I think chx is already working on this based on my notes for the _value
callback. If he doesn't have time he can ping me and I'll do it, its
blocking two things I'm working on now.
> I don't believe we should include the #validate functions for the
> field types / widgets into the form structure thought,
> because if we do it right,. every single field will have validation
> and all that information will not often be modified (fields can still
> have additional validation rules of course).
How do you envision the hardcoded validation working? A fixed callback
per widget/field type? How do users extend it? Do we still process
#validate, but the default is _validate and shouldn't be specified?
> We don't want to bloat the data structure unnecessarily.
I'll agree. I'm not sure I really get it though without a real sample
structure to mull over.
More information about the development