Re: is their a Clojure framework for handling form validation?
Sorry for the delay, I just saw this thread now. I used https://github.com/cemerick/valip A version of https://github.com/weavejester/valip by Chas Emerick which can be used for both client and server side validation. You could eventually take a look at the way I used from here on: https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-13.md HIH mimmo On Jul 5, 2014, at 2:48 PM, Asim Jalis wrote: > For validation check out Bouncer [1][2]. It is elegant and minimal, and also > lets you chain together validators using the threading macro. > > [1] https://github.com/leonardoborges/bouncer > [2] > http://www.leonardoborges.com/writings/2013/01/04/bouncer-validation-lib-for-clojure/ > > Asim > > On Sunday, July 22, 2012 4:46:52 PM UTC-7, larry google groups wrote: > Since 2000 I've been doing web development, first with PHP and then with Ruby > On Rails. In the world of PHP, there are some frameworks, such as Symfony, > that have classes for managing forms, both generating the HTML for the forms, > and also handling the validation of the forms. In the world of Python, the > Django framework also has facilities for generating and validating forms. > These frameworks offer certain time saving conveniences. For instance, with > the Symfony framework, if you have a database table that has a foreign key, > then you can get that other table (the target of the foreign key) to appear > in a form as a pre-populated select box, automatically (after filling out > some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: is their a Clojure framework for handling form validation?
For validation check out Bouncer [1][2]. It is elegant and minimal, and also lets you chain together validators using the threading macro. [1] https://github.com/leonardoborges/bouncer [2] http://www.leonardoborges.com/writings/2013/01/04/bouncer-validation-lib-for-clojure/ Asim On Sunday, July 22, 2012 4:46:52 PM UTC-7, larry google groups wrote: > > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, there are some frameworks, such as > Symfony, that have classes for managing forms, both generating the HTML for > the forms, and also handling the validation of the forms. In the world of > Python, the Django framework also has facilities for generating and > validating forms. These frameworks offer certain time saving conveniences. > For instance, with the Symfony framework, if you have a database table that > has a foreign key, then you can get that other table (the target of the > foreign key) to appear in a form as a pre-populated select box, > automatically (after filling out some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: is their a Clojure framework for handling form validation?
Hi Larry, I've been working on a library to provide conveniences similar to what you described. It makes it really easy to generate nicely styled forms. You can specify default values for your form, validation functions to run upon form submission, and actions to execute in the event of successful or failed validation. The library is called forms-bootstrap and it is meant to be used with the Noir Web framework and Twitter's Bootstrap CSS. Heres the link: https://github.com/dpetrovics/forms-bootstrap I've been working on it in my spare time and its still quite new, so it may change quite a bit in the near future. I hope people will find it useful-- and I would welcome any feedback you may have! Cheers David On Sunday, July 22, 2012 7:46:52 PM UTC-4, larry google groups wrote: > > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, there are some frameworks, such as > Symfony, that have classes for managing forms, both generating the HTML for > the forms, and also handling the validation of the forms. In the world of > Python, the Django framework also has facilities for generating and > validating forms. These frameworks offer certain time saving conveniences. > For instance, with the Symfony framework, if you have a database table that > has a foreign key, then you can get that other table (the target of the > foreign key) to appear in a form as a pre-populated select box, > automatically (after filling out some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
> Instead of calling the ExceptionInfo ctor & .getData directly, it's better to use ex-info & ex-data instead. Baishampayan Thank you for the information. I agree with you. On Friday, July 27, 2012 6:39:29 PM UTC+9, Baishampayan Ghose wrote: > > On Thu, Jul 26, 2012 at 10:19 PM, Takahiro Hozumi > wrote: > > (when-let [m (validate params)] > > (throw (clojure.lang.ExceptionInfo. "validation error" m))) > > > > (defn wrap-validation-exception [handler] > > (fn [req] > > (try > > (handler req) > > (catch clojure.lang.ExceptionInfo e > > {:status 400 > > :headers {"Content-Type" "application/json"} > > :body (some-json-generator (.getData e))} > > Instead of calling the ExceptionInfo ctor & .getData directly, it's > better to use ex-info & ex-data instead. > > Regards, > BG > > -- > Baishampayan Ghose > b.ghose at gmail.com > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
On Thu, Jul 26, 2012 at 10:19 PM, Takahiro Hozumi wrote: > (when-let [m (validate params)] > (throw (clojure.lang.ExceptionInfo. "validation error" m))) > > (defn wrap-validation-exception [handler] > (fn [req] > (try > (handler req) > (catch clojure.lang.ExceptionInfo e > {:status 400 > :headers {"Content-Type" "application/json"} > :body (some-json-generator (.getData e))} Instead of calling the ExceptionInfo ctor & .getData directly, it's better to use ex-info & ex-data instead. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
On Tue, Jul 24, 2012 at 6:05 PM, Trent Ogren wrote: > https://github.com/weavejester/valip > > The approach of that project is interesting. Not only does it decouple > validation from any notion of web form (it just works on maps like many of > the others in this thread), it decouple the error messages from the > predicates that produce an error message. I can't imagine it being any > simpler... I had completely forgotten about that library! Thanks for the reminder! -John -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
If you build simple json API, combining validation function which return validation error as a map and clojure.lang.ExceptionInfo can reduce intermediate error handling code. (when-let [m (validate params)] (throw (clojure.lang.ExceptionInfo. "validation error" m))) (defn wrap-validation-exception [handler] (fn [req] (try (handler req) (catch clojure.lang.ExceptionInfo e {:status 400 :headers {"Content-Type" "application/json"} :body (some-json-generator (.getData e))} On Monday, July 23, 2012 8:46:52 AM UTC+9, larry google groups wrote: > > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, there are some frameworks, such as > Symfony, that have classes for managing forms, both generating the HTML for > the forms, and also handling the validation of the forms. In the world of > Python, the Django framework also has facilities for generating and > validating forms. These frameworks offer certain time saving conveniences. > For instance, with the Symfony framework, if you have a database table that > has a foreign key, then you can get that other table (the target of the > foreign key) to appear in a form as a pre-populated select box, > automatically (after filling out some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
https://github.com/weavejester/valip The approach of that project is interesting. Not only does it decouple validation from any notion of web form (it just works on maps like many of the others in this thread), it decouple the error messages from the predicates that produce an error message. I can't imagine it being any simpler... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
Form validation: https://github.com/joodie/clj-decline https://github.com/joodie/pretzel Form generation: https://github.com/joodie/flutter Robert On Mon, Jul 23, 2012 at 03:30:21PM -0500, gaz jones wrote: > https://github.com/mikejones/mississippi > > again, not specific to web forms. works on clojure maps and is extensible. > > On Sun, Jul 22, 2012 at 6:46 PM, larry google groups > wrote: > > Since 2000 I've been doing web development, first with PHP and then with > > Ruby On Rails. In the world of PHP, there are some frameworks, such as > > Symfony, that have classes for managing forms, both generating the HTML for > > the forms, and also handling the validation of the forms. In the world of > > Python, the Django framework also has facilities for generating and > > validating forms. These frameworks offer certain time saving conveniences. > > For instance, with the Symfony framework, if you have a database table that > > has a foreign key, then you can get that other table (the target of the > > foreign key) to appear in a form as a pre-populated select box, > > automatically (after filling out some config files). > > > > I'm now trying to make Clojure my primary development language for > > everything, including web development. I'm curious, are there any libraries > > in the land of Clojure that offer similar conveniences for forms? > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@googlegroups.com > > Note that posts from new members are moderated - please be patient with your > > first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
https://github.com/mikejones/mississippi again, not specific to web forms. works on clojure maps and is extensible. On Sun, Jul 22, 2012 at 6:46 PM, larry google groups wrote: > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, there are some frameworks, such as > Symfony, that have classes for managing forms, both generating the HTML for > the forms, and also handling the validation of the forms. In the world of > Python, the Django framework also has facilities for generating and > validating forms. These frameworks offer certain time saving conveniences. > For instance, with the Symfony framework, if you have a database table that > has a foreign key, then you can get that other table (the target of the > foreign key) to appear in a form as a pre-populated select box, > automatically (after filling out some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
Paweł Rozynek: > never saw standalone lib just for that purpose tho. https://github.com/michaelklishin/validateur Validateur is not specific to Web forms, works for any kind of data validation and very extensible. MK mich...@defprotocol.org signature.asc Description: Message signed with OpenPGP using GPGMail
Re: is their a Clojure framework for handling form validation?
noir framework got something for it: http://webnoir.org/autodoc/1.3.0/noir.validation.html never saw standalone lib just for that purpose tho. regards PR -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: is their a Clojure framework for handling form validation?
See [1]. This is a web framework which has a form validation included. [1] http://www.clojurescriptone.com Le lundi 23 juillet 2012 01:46:52 UTC+2, larry google groups a écrit : > > Since 2000 I've been doing web development, first with PHP and then with > Ruby On Rails. In the world of PHP, there are some frameworks, such as > Symfony, that have classes for managing forms, both generating the HTML for > the forms, and also handling the validation of the forms. In the world of > Python, the Django framework also has facilities for generating and > validating forms. These frameworks offer certain time saving conveniences. > For instance, with the Symfony framework, if you have a database table that > has a foreign key, then you can get that other table (the target of the > foreign key) to appear in a form as a pre-populated select box, > automatically (after filling out some config files). > > I'm now trying to make Clojure my primary development language for > everything, including web development. I'm curious, are there any libraries > in the land of Clojure that offer similar conveniences for forms? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
is their a Clojure framework for handling form validation?
Since 2000 I've been doing web development, first with PHP and then with Ruby On Rails. In the world of PHP, there are some frameworks, such as Symfony, that have classes for managing forms, both generating the HTML for the forms, and also handling the validation of the forms. In the world of Python, the Django framework also has facilities for generating and validating forms. These frameworks offer certain time saving conveniences. For instance, with the Symfony framework, if you have a database table that has a foreign key, then you can get that other table (the target of the foreign key) to appear in a form as a pre-populated select box, automatically (after filling out some config files). I'm now trying to make Clojure my primary development language for everything, including web development. I'm curious, are there any libraries in the land of Clojure that offer similar conveniences for forms? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en