component / model

Minimalistic extensible data models
122 stars 40 forks source link

Server-side example #59

Closed hkjels closed 10 years ago

hkjels commented 10 years ago

I'm trying to use this on both the client and server. On the server, I do something like.

var user = new User(body);
if(!user.isValid()){
  // Do some error-handling
}

However, isValid returns true even though not all required fields has been filled.

It would be tremendously helpful if someone has a little app they could add to the examples directory that shows the server-side of things.

hkjels commented 10 years ago

Looking at the code, I can see that required-property is not actually implemented, that explains a lot.