[development] How to validate a $node?

Jeremy Epstein jazepstein at gmail.com
Wed Jun 7 04:28:16 UTC 2006


On 6/7/06, Moshe Weitzman <weitzman at tejasa.com> wrote:
> unfortunately, 4.7 is a bit of an intermediate solution which makes this
> hard. the conceptual way to do is is to programtically "submit" the story
> form. In 4.7, this amounts to populating the proper $_POST variables like
> 'type' and 'title' and so on and then building the node form by calling the
> right functions and then calling drupal_get_form(). the node form is the
> most complex of all our forms so i'm not sure this works right.
>
> form api 2.0 will be focused on making things like this easy again.

Indeed. I've been chatting to Adrian about FAPI 2.0, and the vision is
for there to be a separation between 'user-facing forms' and 'data
definitions', and for the data definition system to handle things like
validation. So an import module, for example, could work with the
definition directly, rather than going 'through' a form. This is
closely tied in to the import / export API that I'm working on, as my
Summer of Code project.

@Robrecht: have you heard about this project? I have looked into your
node_import module, and I would love to hear any feedback that you may
have about what you'd like to see in an import / export API. Your
module has already given me plenty of ideas for what should be in such
an API.

Cheers,
Jaza.


More information about the development mailing list