[erlang-questions] [ANN] sheriff 0.2: parse transform for type-based data validation
Wed Feb 15 00:23:38 CET 2012
Hmm, yeah. And I should have mentioned I modified Ulf's exprecs to have
slightly different syntax but the main thing was to also use types in
records to add calls to convert (which I may change to check...) for
setting each attribute of a record.
Add support for validating email addresses and more complicated types is in
my plan for dealing with that model creation. But no reason to have it not
be a secondary piece of sheriff now :)
On Tue, Feb 14, 2012 at 10:01 AM, Loïc Hoguin <> wrote:
> Right, forgot about that. I also want pre-defined functions for validating
> things like emails, URLs and others that string() or binary() types can't
> define. But I'm not sure this should go in sheriff proper, it could very
> well just be another library, perhaps generated based on RFCs or something.
> On 02/14/2012 04:24 PM, Tristan Sloughter wrote:
>> It would be nice if the validation of a type could be defined as a fun.
>> I was going to build something similar to this for validation on models
>> in a web framework. So for validating email addresses and things like
>> that. More complicated than a simple type.
>> On Tue, Feb 14, 2012 at 8:35 AM, Loïc Hoguin <
>> <mailto:>> wrote:
>> In the short term fixing bugs, adding the missing iolist() and
>> iodata() validation and a couple other less documented types.
>> In the long term it would be nice to find a way to generate
>> validation functions also for types found in the Erlang libs, or at
>> least a certain subset for the most used of the lot, like the
>> calendar module for example.
>> I'm open to any and all suggestions at this point.
>> On 02/14/2012 02:38 PM, Ignas Vyšniauskas wrote:
>> I'm confused why no-one is excited about this, this looks
>> awesome! I am
>> already looking forward to using this in our project.
>> Loïc, are there any milestones/plans regarding further
>> developement of this?
>> On 2012.02.13 10 <tel:2012.02.13%2010>:52, Loïc Hoguin wrote:
>> We just released the first beta version of the sheriff parse
>> It allows you to validate data against types defined through
>> the Erlang
>> type system.
>> Loïc Hoguin
>> Erlang Cowboy
>> Nine Nines
>> erlang-questions mailing list
> Loïc Hoguin
> Erlang Cowboy
> Nine Nines
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions