public JsonNetResult ValidateCustomRuleSyntax(int modelID, string customRule) { var sp = new StandardParser(); var cs = new ConfiguratorSession(null, null, null); try { sp.ParseString(ref cs, customRule); } catch { return new JsonNetResult { Data = false }; } return new JsonNetResult { Data = true }; }