Single line specification for field values.
This project is development phase.
A list of parser and validator is available on https://github.com/odentools/s-spec/wiki/Softwares
Basic format:
VARIABLE_TYPE[(MIN_VALUE, MAX_VALUE)|(MAX_VALUE)] [DEFAULT x] [REGEXP exp]
Example:
INTEGER(0,255) DEFAULT 100
INTEGER(0,255)
INTEGER(255)
INTEGER (255)
INTEGER()
INTEGER
...
- BOOLEAN
- FLOAT
- INTEGER
- NUMBER - INTEGER and FLOAT; Alias of FLOAT at present.
- STRING
- TEXT - Alias of STRING
Minimum value.
If the variable type is STRING or TEXT, it gives limitation with string length.
Maximum value.
If the variable type is STRING or TEXT, it gives limitation with string length.
Default value.
Example:
DEFAULT 'hello'
DEFAULT 0
DEFAULT false
Validate whether the value is matched to the regular-expression.
Example:
REGEXP '^[a-z\'\" ]+$'
Public Domain; Maintained by OdenTools.