Contact Us form

14 views
Skip to first unread message

QAISER MUHAMMAD

unread,
Sep 29, 2014, 12:50:03 PM9/29/14
to plataformate...@googlegroups.com
I am using simple_form to build a simple contact us form. The form does not have any model and I need to confirm that the fields are required. How do I go about adding the validations?

Carlos Antonio da Silva

unread,
Sep 29, 2014, 11:31:30 PM9/29/14
to plataformate...@googlegroups.com
You can verify the params on the controller to know whether or not they are present, although I'd recommend creating a small class and include ActiveModel::Model to help you with that.

On Mon, Sep 29, 2014 at 1:50 PM, QAISER MUHAMMAD <qaiser....@gmail.com> wrote:
I am using simple_form to build a simple contact us form. The form does not have any model and I need to confirm that the fields are required. How do I go about adding the validations?

--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
At.
Carlos Antonio
Reply all
Reply to author
Forward
0 new messages