/// <summary> /// 添加必填项验证 /// </summary> private void AddRequired(FormFieldBuilder formFieldBuilder, InputBuilder inputBuilder) { if (_config.Contains(UiConst.Required) == false) { return; } inputBuilder.AddAttribute(UiConst.Required, "true"); AddError(formFieldBuilder, inputBuilder, UiConst.Required, _config.GetValue(UiConst.RequiredMessage)); }
/// <summary> /// 解析属性表达式 /// </summary> private void ResolveExpression() { if (_config.Contains(UiConst.For) == false) { return; } var expression = _config.GetValue <ModelExpression>(UiConst.For); TextBoxExpressionResolver.Init(expression, _config); }