just 2 cents:

guys, please don't mix up validity and conformity to business rules. 
sometimes it's hard to not to mix them up, but it is important 
doe distinguish. That a form field should be an email address is the first 
one, that this address should be unique in the system, is the other thing. 
Validation proves the format and type of the data, Businessrules proves 
integrity of the data model. first is made by simple sync functions, the 
second one needs interaction with the business model layer including 
db-access. 

Am Mittwoch, 23. Januar 2013 09:38:22 UTC+1 schrieb Raynos:
>
> validation and ensuring global constraints are met at the database layer 
> are two completely seperate things.
>
> One validates that a piece of data is valid and sanitized by some local 
> constraint. The other checks global constraints across your entire system.
>
> Why would you want to split these up? Because validation without global 
> constraint checks is a very simple pure function, take input, return 
> boolean or errors.
>
>
> On Tue, Jan 22, 2013 at 3:06 AM, Alan Hoffmeister 
> <[email protected]<javascript:>
> > wrote:
>
>> So how do you validate duplicated username, e-mail, etc..? As far as I 
>> could see I need to split the validation process for this, and I think that 
>> this is fucking up with the validation.
>>
>> --
>> Att,
>> Alan Hoffmeister
>>
>>
>> 2013/1/22 Jake Verbaten <[email protected] <javascript:>>
>>
>>> Your validating logic is only async if it does IO. 
>>>
>>> If your validation does IO you fucked up. You don't need async support.
>>>
>>>
>>> On Mon, Jan 21, 2013 at 10:11 AM, Alan Hoffmeister 
>>> <[email protected]<javascript:>
>>> > wrote:
>>>
>>>> Katsumoto, thats a nice well known package, but I think that lacks 
>>>> async support.
>>>>
>>>> --
>>>> Att,
>>>> Alan Hoffmeister
>>>>
>>>>
>>>> 2013/1/21 Katsumoto <[email protected] <javascript:>>
>>>>
>>>>> take a look at https://github.com/chriso/node-validator
>>>>>
>>>>> пятница, 18 января 2013 г., 13:07:13 UTC+2 пользователь Alan 
>>>>> Hoffmeister написал:
>>>>>  
>>>>>> Hello fellows!
>>>>>>
>>>>>> How are you doing data validation like forms and other user inputs? I 
>>>>>> know that there is some modules to do that but my intention is to do a 
>>>>>> brainstorm to gather ideas for a new module that I'm developing.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> --
>>>>>> Att,
>>>>>> Alan Hoffmeister
>>>>>>  
>>>>>  -- 
>>>>> Job Board: http://jobs.nodejs.org/
>>>>> Posting guidelines: 
>>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "nodejs" group.
>>>>> To post to this group, send email to [email protected]<javascript:>
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected] <javascript:>
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>>
>>>>
>>>>  -- 
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines: 
>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>> To post to this group, send email to [email protected]<javascript:>
>>>> To unsubscribe from this group, send email to
>>>> [email protected] <javascript:>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>
>>>
>>>  -- 
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines: 
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]<javascript:>
>>> To unsubscribe from this group, send email to
>>> [email protected] <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>
>>  -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to