Bruno Reis
unread,Nov 28, 2008, 2:53:12 PM11/28/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to json-...@googlegroups.com
For the following:
schema
{
"description":"new user registration form",
"type":"object",
"properties": {
"username": {"type":"string","optional":false},
"emailaddress":{"type":"string"},
"password": {"type":"string"},
"password2": {"type":"string"}
}
}
I see that
{
"username": "",
"emailaddress": "asdf",
"password": "asdf",
"password2": "asdf"
}
validates Ok
and
{
"emailaddress": "asdf",
"password": "asdf",
"password2": "asdf"
}
dont
what I think is a nice behaviour.
But in web, using forms, its very common to validate a "not blank" or "not empty" string.
How should I define that on the schema?