aL3xa/rapport — Issue #24: Optional/required inputs and string inputs
Author: aL3xa
Created: 2012-01-10 13:34:03+00:00
State: open
Labels: feature, template

At this point, it's not possible to supply optional inputs other than `CSV` or `boolean` types. Template author should specify whether or not an input is required, and header parser should also be aware of differences between values and variables. For instance, `"age"` can be just a string, and it can also refer to eponymous column name of supplied `data.frame`.

My suggestions on this issue:

- add more inputs, like: `string` for string input, `number` for numeric input
- add some wildcard character to indicate required input, like `*` or `!`
- `[` and `]` should remain as wildcard for length limits
- an option to specify default value - this will probably require another `|`-delimited section in header. @daroczig if you have any better idea about this one, please do tell.

So, in a nutshell, `string` and `number` inputs can be specified like this:

```
str | string[1] | String input | this is a string input
num | number[1] | Number input | this is a number input
```

we can specify mandatory field with `*` and put something like `=` after size limits to indicate default value, like this:

```
str | *string[1] = foo | label | description
```
or should we move required stuff in name section, rather than limit section. @daroczig, please send your suggestions!