Skip to content
Guillaume Camera edited this page Feb 18, 2016 · 12 revisions

Welcome to the django-formidable wiki!

Grammar Validations

validation : orBool | ifStatement ;
ifStatement : 'if(' orBool ',' validation ( ',' validation )? ')' ;
orBool : andBool ( 'or(' andBool ')' )* ;
andBool : comparison ( 'and(' comparison )* ')' ;
comparison : compareFunc '(' (function(',' function)?  ')' | boolFunc '(' functionList ')' | BOOLEAN;
compareFunc: 'EQ' | 'NOT' | 'GT' | 'GTE' | 'LT' | 'LTE';
boolFunc : ## Dynamically generated ;
functionList : function(',' function) ? ;
function : ID '(' argsList ')' | value ;
argsList : function ( ',' function )*;
value : STRING | INTEGER | DATE | BOOLEAN | field ;
field : 'field(' ID ')';
Clone this wiki locally