Forum: Radiant CMS Validating Mailer Extension

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2007-03-27 21:48
(Received via mailing list)
I had a tour through the code that makes Mailer work, and can't for the
life of me see how you could define a server-side validation of any of
the input. The template is rendered. If there is POST data for a tag in
the template, that field is filled. If there isn't, oh well. I imagine
that a JavaScript validator could be used, but those always feel icky
to me.

Can anyone point out how you could intercept the form posting, perform
a little basic validation on it, and set some errors (missing, too
short, malformed, whatever) to be flashed to the visitor, and maybe
even pre-fill the form for correction?

The current code looks as though it just takes any old post, and tries
to mail it, and redirects if the mail gets sent.


31e7188882f9871237de49de80384c07?d=identicon&s=25 Colin Nederkoorn (Guest)
on 2007-03-28 00:35
(Received via mailing list)

What you're looking for is a "todo" on this extension according to
the readme. You could try and do it yourself, or wait:

  * Abstract tag naming, doesn't need to mimick HTML input types
  * Support for file attachments to emails
  * Validate recipient emails addresses -- at least the format
  * Better Error handling

Good luck,
A47e0a6beeb9d048ff054fc1c3a97418?d=identicon&s=25 Walter Davis (walterdavis)
on 2007-03-28 00:38
(Received via mailing list)
Thanks. I saw that. I guess more of what I was asking was, in the
world of tags (which is what the form submissions seem to get turned
into here) how does one go about validating the content of any given
tag? I couldn't see anything in the model that I could turn to, it
all turns into a blob of HTML mush to be added to the body of the
mail message, more or less immediately after the successful post.

This topic is locked and can not be replied to.