Exemplo n.º 1
0
        public override IFormBuilder <JObject> Field(string name, ActiveDelegate <JObject> active = null, ValidateAsyncDelegate <JObject> validate = null)
        {
            var field = new FieldJson(this, name);

            field.SetActive(active);
            field.SetValidate(validate);
            AddSteps(field.Before);
            Field(field);
            AddSteps(field.After);
            return(this);
        }
Exemplo n.º 2
0
        public override IFormBuilder <JObject> Field(string name, PromptAttribute prompt, ActiveDelegate <JObject> active = null, ValidateAsyncDelegate <JObject> validate = null)
        {
            var field = new FieldJson(this, name);

            field.SetPrompt(prompt);
            if (active != null)
            {
                field.SetActive(active);
            }
            if (validate != null)
            {
                field.SetValidate(validate);
            }
            return(Field(field));
        }