spiral-project/daybed — pull request #55 by leplatrem (2013-05-31 09:30:03+00:00)
Title: Add required option to field definitions

Allows to specify optional fields in definition.

I opend this PR, just to make sure you're ok with the ``required`` keyword at field level.

```
"fields": [{"name": "age", "type": "int", "required": False}]
```

If we switch to JSON schema #53, we'll move to global ``required`` attributes with list of field names, at definition level.

```
"fields": [{"name": "firstname", "type": "string"}, {"name": "age", "type": "int"}],
"required": ["name"],
```
The latter is slightly more complicated in client-side form generation...