text: (window.webpackJsonp=window.webpackJsonp||[]).push([[7],{142:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var a=n(0),i=n.n(a);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n,a,i={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=i.a.createContext({}),p=function(e){var t=i.a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):b(b({},t),e)),n},s=function(e){var t=p(e.components);return i.a.createElement(o.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},m=i.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,r=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),s=p(n),m=a,u=s["".concat(r,".").concat(m)]||s[m]||d[m]||l;return n?i.a.createElement(u,b(b({ref:t},o),{},{components:n})):i.a.createElement(u,b({ref:t},o))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,r=new Array(l);r[0]=m;var b={};for(var c in t)hasOwnProperty.call(t,c)&&(b[c]=t[c]);b.originalType=e,b.mdxType="string"==typeof e?e:a,r[1]=b;for(var o=2;o<l;o++)r[o]=n[o];return i.a.createElement.apply(null,r)}return i.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},143:function(e,t,n){"use strict";var a=n(0),i=n(19);t.a=function(){var e=Object(a.useContext)(i.a);if(null===e)throw new Error("Docusaurus context not provided");return e}},144:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return r}));var a=n(143),i=n(145);function l(){var e=Object(a.a)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=void 0===t?"/":t,l=e.url;return{withBaseUrl:function(e,t){return function(e,t,n,a){var l=void 0===a?{}:a,r=l.forcePrependBaseUrl,b=void 0!==r&&r,c=l.absolute,o=void 0!==c&&c;if(!n)return n;if(n.startsWith("#"))return n;if(Object(i.b)(n))return n;if(b)return t+n;var p=n.startsWith(t)?n:t+n.replace(/^\//,"");return o?e+p:p}(l,n,e,t)}}}function r(e,t){return void 0===t&&(t={}),(0,l().withBaseUrl)(e,t)}},145:function(e,t,n){"use strict";function a(e){return!0===/^(\w*:|\/\/)/.test(e)}function i(e){return void 0!==e&&!a(e)}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}))},146:function(e,t,n){"use strict";function a(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=a(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=a(e))&&(i&&(i+=" "),i+=t);return i}},147:function(e,t,n){"use strict";var a=n(0),i=Object(a.createContext)(void 0);t.a=i},148:function(e,t,n){"use strict";var a=n(0),i=n(147);t.a=function(){var e=Object(a.useContext)(i.a);if(null==e)throw new Error("`useUserPreferencesContext` is used outside of `Layout` Component.");return e}},149:function(e,t,n){"use strict";var a=n(0),i=n.n(a),l=n(148),r=n(146),b=n(47),c=n.n(b),o=37,p=39;t.a=function(e){var t=e.block,n=e.children,b=e.defaultValue,s=e.values,d=e.groupId,m=Object(l.a)(),u=m.tabGroupChoices,O=m.setTabGroupChoices,j=Object(a.useState)(b),N=j[0],g=j[1],v=Object(a.useState)(!1),h=v[0],C=v[1];if(null!=d){var y=u[d];null!=y&&y!==N&&s.some((function(e){return e.value===y}))&&g(y)}var f=function(e){g(e),null!=d&&O(d,e)},V=[],T=function(e){e.metaKey||e.altKey||e.ctrlKey||C(!0)},w=function(){C(!1)};return Object(a.useEffect)((function(){window.addEventListener("keydown",T),window.addEventListener("mousedown",w)}),[]),i.a.createElement("div",null,i.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:Object(r.a)("tabs",{"tabs--block":t})},s.map((function(e){var t=e.value,n=e.label;return i.a.createElement("li",{role:"tab",tabIndex:0,"aria-selected":N===t,className:Object(r.a)("tabs__item",c.a.tabItem,{"tabs__item--active":N===t}),style:h?{}:{outline:"none"},key:t,ref:function(e){return V.push(e)},onKeyDown:function(e){!function(e,t,n){switch(n.keyCode){case p:!function(e,t){var n=e.indexOf(t)+1;e[n]?e[n].focus():e[0].focus()}(e,t);break;case o:!function(e,t){var n=e.indexOf(t)-1;e[n]?e[n].focus():e[e.length-1].focus()}(e,t)}}(V,e.target,e),T(e)},onFocus:function(){return f(t)},onClick:function(){f(t),C(!1)},onPointerDown:function(){return C(!1)}},n)}))),i.a.createElement("div",{role:"tabpanel",className:"margin-vert--md"},a.Children.toArray(n).filter((function(e){return e.props.value===N}))[0]))}},150:function(e,t,n){"use strict";var a=n(0),i=n.n(a);t.a=function(e){return i.a.createElement("div",null,e.children)}},58:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return p})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return m}));var a=n(2),i=n(6),l=(n(0),n(142)),r=n(144),b=n(149),c=n(150),o={id:"data-validation",title:"8. \u6570\u636e\u6821\u9a8c",sidebar_label:"8. \u6570\u636e\u6821\u9a8c"},p={unversionedId:"data-validation",id:"data-validation",isDocsHomePage:!1,title:"8. \u6570\u636e\u6821\u9a8c",description:"8.1 \u5173\u4e8e\u6570\u636e\u6821\u9a8c",source:"@site/docs\\data-validation.mdx",slug:"/data-validation",permalink:"/fur/docs/data-validation",editUrl:"https://gitee.com/monksoul/Fur/tree/main/handbook/docs/data-validation.mdx",version:"current",sidebar_label:"8. \u6570\u636e\u6821\u9a8c",sidebar:"docs",previous:{title:"7. \u53cb\u597d\u5f02\u5e38\u5904\u7406",permalink:"/fur/docs/friendly-exception"},next:{title:"9.1 \u6570\u636e\u5e93\u4e0a\u4e0b\u6587",permalink:"/fur/docs/dbcontext"}},s=[{value:"8.1 \u5173\u4e8e\u6570\u636e\u6821\u9a8c",id:"81-\u5173\u4e8e\u6570\u636e\u6821\u9a8c",children:[]},{value:"8.2 \u6570\u636e\u6821\u9a8c\u7684\u597d\u5904",id:"82-\u6570\u636e\u6821\u9a8c\u7684\u597d\u5904",children:[]},{value:"8.3 \u6570\u636e\u6821\u9a8c\u65b9\u5f0f",id:"83-\u6570\u636e\u6821\u9a8c\u65b9\u5f0f",children:[{value:"8.3.1 \u4f20\u7edf\u65b9\u5f0f",id:"831-\u4f20\u7edf\u65b9\u5f0f",children:[]},{value:"8.3.2 <code>Mvc</code> \u7279\u6027\u65b9\u5f0f",id:"832-mvc-\u7279\u6027\u65b9\u5f0f",children:[]}]},{value:"8.4 <code>DataValidation</code> \u9a8c\u8bc1 \ud83e\udd17",id:"84-datavalidation-\u9a8c\u8bc1-",children:[{value:"8.4.1 <code>DataValidation</code> \u4f18\u70b9",id:"841-datavalidation-\u4f18\u70b9",children:[]}]},{value:"8.5 <code>DataValidation</code> \u4f7f\u7528",id:"85-datavalidation-\u4f7f\u7528",children:[{value:"8.5.1 \u6ce8\u518c\u9a8c\u8bc1\u670d\u52a1",id:"851-\u6ce8\u518c\u9a8c\u8bc1\u670d\u52a1",children:[]},{value:"8.5.2 \u517c\u5bb9 <code>Mvc</code> \u7279\u6027\u9a8c\u8bc1",id:"852-\u517c\u5bb9-mvc-\u7279\u6027\u9a8c\u8bc1",children:[]},{value:"8.5.3 \u517c\u5bb9 <code>Mvc</code> \u590d\u6742\u9a8c\u8bc1",id:"853-\u517c\u5bb9-mvc-\u590d\u6742\u9a8c\u8bc1",children:[]}]},{value:"8.6 \u624b\u52a8\u9a8c\u8bc1",id:"86-\u624b\u52a8\u9a8c\u8bc1",children:[{value:"8.7.1 \u9a8c\u8bc1\u6a21\u578b",id:"871-\u9a8c\u8bc1\u6a21\u578b",children:[]},{value:"8.7.2 <code>ValidationTypes</code> \u5e38\u89c1\u9a8c\u8bc1",id:"872-validationtypes-\u5e38\u89c1\u9a8c\u8bc1",children:[]},{value:"8.7.3 <code>[DataValidation]</code> \u7279\u6027",id:"873-datavalidation-\u7279\u6027",children:[]}]},{value:"8.7 <code>[NonValidation]</code> \u8df3\u8fc7\u9a8c\u8bc1",id:"87-nonvalidation-\u8df3\u8fc7\u9a8c\u8bc1",children:[]},{value:"8.8 \u9ad8\u7ea7\u81ea\u5b9a\u4e49\u64cd\u4f5c",id:"88-\u9ad8\u7ea7\u81ea\u5b9a\u4e49\u64cd\u4f5c",children:[{value:"8.8.1 \u81ea\u5b9a\u4e49 <code>ValidationTypes</code> \u7c7b\u578b",id:"881-\u81ea\u5b9a\u4e49-validationtypes-\u7c7b\u578b",children:[]},{value:"8.8.2 \u81ea\u5b9a\u4e49 <code>ValidationTypes</code> \u5931\u8d25\u6d88\u606f",id:"882-\u81ea\u5b9a\u4e49-validationtypes-\u5931\u8d25\u6d88\u606f",children:[]}]},{value:"8.9 \u6a21\u578b\u9a8c\u8bc1\u8303\u56f4",id:"89-\u6a21\u578b\u9a8c\u8bc1\u8303\u56f4",children:[{value:"8.9.1 \u5168\u5c40\u9a8c\u8bc1",id:"891-\u5168\u5c40\u9a8c\u8bc1",children:[]},{value:"8.9.2 <code>[NonValidation]</code> \u8df3\u8fc7\u9a8c\u8bc1",id:"892-nonvalidation-\u8df3\u8fc7\u9a8c\u8bc1",children:[]},{value:"8.9.3 <code>[TypeFilter(typeof(DataValidationFilter))]</code> \u5c40\u90e8\u9a8c\u8bc1",id:"893-typefiltertypeofdatavalidationfilter-\u5c40\u90e8\u9a8c\u8bc1",children:[]},{value:"8.9.4 <code>[ApiController]</code> \u63a7\u5236\u5668\u8303\u56f4\u9a8c\u8bc1",id:"894-apicontroller-\u63a7\u5236\u5668\u8303\u56f4\u9a8c\u8bc1",children:[]}]},{value:"8.10 <code>MiniProfiler</code> \u67e5\u770b",id:"810-miniprofiler-\u67e5\u770b",children:[]},{value:"8.10 \u591a\u8bed\u8a00\u652f\u6301",id:"810-\u591a\u8bed\u8a00\u652f\u6301",children:[]},{value:"8.11 \u9a8c\u8bc1\u6a21\u578b\u63d0\u4f9b\u5668",id:"811-\u9a8c\u8bc1\u6a21\u578b\u63d0\u4f9b\u5668",children:[]},{value:"8.12 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"812-\u53cd\u9988\u4e0e\u5efa\u8bae",children:[]}],d={rightToc:s};function m(e){var t=e.components,n=Object(i.a)(e,["components"]);return Object(l.b)("wrapper",Object(a.a)({},d,n,{components:t,mdxType:"MDXLayout"}),Object(l.b)("h2",{id:"81-\u5173\u4e8e\u6570\u636e\u6821\u9a8c"},"8.1 \u5173\u4e8e\u6570\u636e\u6821\u9a8c"),Object(l.b)("p",null,"\u6570\u636e\u6821\u9a8c\u5b57\u9762\u4e0a\u7684\u610f\u601d\u5c31\u662f\u5bf9\u4f7f\u7528\u8005\u63d0\u4ea4\u8fc7\u6765\u7684\u6570\u636e\u8fdb\u884c\u5408\u6cd5\u6027\u9a8c\u8bc1\u3002\u5728\u4e00\u5957\u5b8c\u5584\u7684\u5e94\u7528\u7cfb\u7edf\u4e2d\uff0c\u6570\u636e\u6709\u6548\u6027\u6821\u9a8c\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e1a\u52a1\u5904\u7406\u7b2c\u4e00\u9053\u5173\u5361\u3002"),Object(l.b)("h2",{id:"82-\u6570\u636e\u6821\u9a8c\u7684\u597d\u5904"},"8.2 \u6570\u636e\u6821\u9a8c\u7684\u597d\u5904"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u8fc7\u6ee4\u4e0d\u5b89\u5168\u6570\u636e\uff0c\u63d0\u9ad8\u7cfb\u7edf\u7684\u5b89\u5168\u6027"),Object(l.b)("li",{parentName:"ul"},"\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u4e1a\u52a1\u5f02\u5e38\u5904\u7406\uff0c\u63d0\u9ad8\u7cfb\u7edf\u7684\u54cd\u5e94\u901f\u5ea6"),Object(l.b)("li",{parentName:"ul"},"\u5927\u5927\u63d0\u9ad8\u7cfb\u7edf\u7a33\u5b9a\u6027"),Object(l.b)("li",{parentName:"ul"},"\u5927\u6570\u636e\u5e76\u53d1\u65f6\u8d77\u7740\u4e00\u5b9a\u7684\u7f13\u51b2\u4f5c\u7528")),Object(l.b)("h2",{id:"83-\u6570\u636e\u6821\u9a8c\u65b9\u5f0f"},"8.3 \u6570\u636e\u6821\u9a8c\u65b9\u5f0f"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u4f20\u7edf\u65b9\u5f0f\uff0c\u5728\u4e1a\u52a1\u4ee3\u7801\u4e4b\u524d\u624b\u52a8\u9a8c\u8bc1"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Mvc")," \u7279\u6027\u65b9\u5f0f\uff0c",Object(l.b)("inlineCode",{parentName:"li"},"Mvc")," \u5185\u7f6e\u7684 ",Object(l.b)("inlineCode",{parentName:"li"},"DataAnnotations")," \u65b9\u5f0f"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u63a8\u8350\u65b9\u5f0f"),"\uff0c",Object(l.b)("inlineCode",{parentName:"li"},"Fur")," \u6846\u67b6\u5185\u7f6e\u7684 ",Object(l.b)("inlineCode",{parentName:"li"},"DataValidation")," \u9a8c\u8bc1"),Object(l.b)("li",{parentName:"ul"},"\u5176\u4ed6\u65b9\u5f0f\uff0c\u4f7f\u7528\u7b2c\u4e09\u65b9\u9a8c\u8bc1\u5e93\uff0c\u5982 ",Object(l.b)("inlineCode",{parentName:"li"},"FluentValidation"))),Object(l.b)("h3",{id:"831-\u4f20\u7edf\u65b9\u5f0f"},"8.3.1 \u4f20\u7edf\u65b9\u5f0f"),Object(l.b)("p",null,"\u5728\u5f88\u591a\u8001\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u770b\u5230\u8fd9\u6837\u7684\u4ee3\u7801\uff1a"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{4,9,14}","{4,9,14}":!0}),'public bool Insert(Person person)\n{\n    // \u9a8c\u8bc1\u53c2\u6570\n    if(string.IsNullOrEmty(person.Name))\n    {\n        throw new System.Exception("\u540d\u5b57\u4e0d\u80fd\u4e3a\u7a7a");\n    }\n\n    if(person.Age < 18)\n    {\n        throw new System.Exception("\u5e74\u9f84\u4e0d\u80fd\u5c0f\u4e8e 18 \u5c81");\n    }\n\n    if(!person.Password.Equals(person.ConfirmPassword)\n    {\n        throw new System.Exception("\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u81f4");\n    }\n\n    // \u4e1a\u52a1\u4ee3\u7801\n    _repository.Insert(person.Adapt<PersonEntity>());\n\n    // ...\n}\n')),Object(l.b)("p",null,"\u4ece\u4e0a\u9762\u7684\u4ee3\u7801\u770b\u8d77\u6765\uff0c\u4f3c\u4e4e\u6ca1\u6709\u4ec0\u4e48\u4e0d\u59a5\uff0c\u4f46\u662f\u4ece\u4e00\u4e2a\u7a0b\u5e8f\u53ef\u7ef4\u62a4\u6027\u6765\u8bf4\uff0c\u8fd9\u662f\u4e00\u4e2a\u7cdf\u7cd5\u7684\u4ee3\u7801\uff0c\u56e0\u4e3a\u8be5\u4e1a\u52a1\u4ee3\u7801\u4e2d",Object(l.b)("strong",{parentName:"p"},"\u5305\u542b\u4e86\u592a\u591a\u4e0e\u4e1a\u52a1\u65e0\u5173\u7684\u6570\u636e\u9a8c\u8bc1"),"\u3002"),Object(l.b)("p",null,"\u8bd5\u60f3\u4e00\u4e0b\uff0c\u5982\u679c\u8fd9\u4e2a ",Object(l.b)("inlineCode",{parentName:"p"},"Person")," \u6709 \u51e0\u5341\u4e2a\u53c2\u6570\u90fd\u9700\u8981\u9a8c\u8bc1\u5462\uff1f\u53ef\u60f3\u800c\u77e5\uff0c\u8fd9\u662f\u4e00\u4e2a\u5e9e\u5927\u7684\u4e1a\u52a1\u4ee3\u7801\u3002"),Object(l.b)("p",null,"\u518d\u8005\uff0c\u5982\u679c\u5176\u4ed6\u5730\u65b9\u4e5f\u9700\u8981\u7528\u5230\u8fd9\u4e2a ",Object(l.b)("inlineCode",{parentName:"p"},"Person")," \u7c7b\u9a8c\u8bc1\u5462\uff1f\u90a3\u4ee3\u7801\u597d\u6bd4\u8001\u9f20\u5543\u8fc7\u7684\u9762\u5305\u5c51\u4e00\u6837\uff0c\u5230\u5904\u90fd\u662f\u3002"),Object(l.b)("p",null,"\u5982\u6b64\u5f97\u77e5\uff0c\u8fd9\u6837\u7684\u65b9\u5f0f\u662f\u6781\u5176\u4e0d\u63a8\u8350\u7684\uff0c",Object(l.b)("strong",{parentName:"p"},"\u4e0d\u4f46\u6c61\u67d3\u4e86\u4e1a\u52a1\u4ee3\u7801\uff0c\u4e5f\u7834\u574f\u4e86\u4e1a\u52a1\u804c\u8d23\u5355\u4e00\u6027\u539f\u7406\uff0c\u4e5f\u8ba9\u9a8c\u8bc1\u903b\u8f91\u65e0\u6cd5\u5b9e\u73b0\u901a\u7528\uff0c\u540e\u7eed\u7ef4\u62a4\u96be\u5ea6\u5927\u5927\u5347\u7ea7"),"\u3002"),Object(l.b)("h3",{id:"832-mvc-\u7279\u6027\u65b9\u5f0f"},"8.3.2 ",Object(l.b)("inlineCode",{parentName:"h3"},"Mvc")," \u7279\u6027\u65b9\u5f0f"),Object(l.b)("p",null,"\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"ASP.NET Core")," \u4e2d\uff0c\u5fae\u8f6f\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u5168\u65b0\u7684 ",Object(l.b)("inlineCode",{parentName:"p"},"\u7279\u6027")," \u9a8c\u8bc1\u65b9\u5f0f\uff0c\u53ef\u901a\u8fc7\u5bf9\u5bf9\u8c61\u8d34\u7279\u6027\u5b9e\u73b0\u6570\u636e\u9a8c\u8bc1\u3002\u8fd9\u79cd\u65b9\u5f0f\u6709\u6548\u7684\u5c06\u6570\u636e\u6821\u9a8c\u548c\u4e1a\u52a1\u4ee3\u7801\u5265\u79bb\u5f00\u6765\uff0c\u800c\u4e14\u5bb9\u6613\u4f7f\u7528\u548c\u62d3\u5c55\u3002"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u5728\u6a21\u578b\u4e2d\u9a8c\u8bc1"))),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,7-8,11-12}","{1,7-8,11-12}":!0}),"using System.ComponentModel.DataAnnotations;\n\nnamespace Hoa.Application.Authorization.Dtos\n{\n    public class SignInInput\n    {\n        [Required]  // \u5fc5\u586b\u9a8c\u8bc1\n        [MinLength(4)]  // \u6700\u5c0f\u957f\u5ea6\u9a8c\u8bc1\n        public string Account { get; set; }\n\n        [Required]    // \u5fc5\u586b\u9a8c\u8bc1\n        [MaxLength(32)]    // \u6700\u5927\u957f\u5ea6\u9a8c\u8bc1\n        public string Password { get; set; }\n    }\n}\n")),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u5728\u53c2\u6570\u4e2d\u9a8c\u8bc1"))),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{2-3,8-9,12-13}","{2-3,8-9,12-13}":!0}),'public void CheckMethodParameterValid(\n    [Required]    // \u5fc5\u586b\u9a8c\u8bc1\n    [MinLength(4)]    // \u6700\u5c0f\u957f\u5ea6\u9a8c\u8bc1\n    string name,\n\n    int age,\n\n    [Required]    // \u5fc5\u586b\u9a8c\u8bc1\n    [RegularExpression("[a-zA-Z0-9_]{8,30}")    // \u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\n    string password,\n\n    [Required]    // \u5fc5\u586b\u9a8c\u8bc1\n    [RegularExpression("[a-zA-Z0-9_]{8,30}")    // \u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\n    string confirmPassword\n)\n{\n    // TODO\n}\n')),Object(l.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"\u5c0f\u63d0\u9192")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u5982\u679c\u51fd\u6570\u7684\u53c2\u6570\u5927\u4e8e\u6216\u7b49\u4e8e 3 \u4e2a\uff0c\u5efa\u8bae\u62bd\u79bb\u51fa\u6a21\u578b\u7c7b\uff0c\u4e5f\u5c31\u662f\u4e0d\u5efa\u8bae\u4e0a\u9762\u7684\u65b9\u5f0f\u3002"))),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u81ea\u5b9a\u4e49\u7279\u6027\u9a8c\u8bc1"))),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,13-24}","{1,13-24}":!0}),'public class ClassicMovieAttribute : ValidationAttribute\n{\n    public ClassicMovieAttribute(int year)\n    {\n        Year = year;\n    }\n\n    public int Year { get; }\n\n    public string GetErrorMessage() =>\n        $"Classic movies must have a release year no later than {Year}.";\n\n    protected override ValidationResult IsValid(object value, ValidationContext validationContext)\n    {\n        var movie = (Movie)validationContext.ObjectInstance;\n        var releaseYear = ((DateTime)value).Year;\n\n        if (movie.Genre == Genre.Classic && releaseYear > Year)\n        {\n            return new ValidationResult(GetErrorMessage());\n        }\n\n        return ValidationResult.Success;\n    }\n}\n')),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},Object(l.b)("inlineCode",{parentName:"strong"},"IValidatableObject")," \u590d\u6742\u9a8c\u8bc1"))),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,3,10-19}","{1,3,10-19}":!0}),'using System.Collections.Generic;\n\npublic class DtoModel : IValidatableObject\n{\n    [Required]\n    [StringLength(100)]\n    public string Title { get; set; }\n\n    // \u4f60\u7684\u9a8c\u8bc1\u903b\u8f91\n    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)\n    {\n        if (\u4f60\u7684\u903b\u8f91\u4ee3\u7801)\n        {\n            yield return new ValidationResult(\n                "\u9519\u8bef\u6d88\u606f"\n                ,new[] { nameof(Title) }  // \u9a8c\u8bc1\u5931\u8d25\u7684\u5c5e\u6027\n            );\n        }\n    }\n}\n')),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Mvc")," \u7279\u6027\u65b9\u5f0f\u6781\u5927\u7684\u5c06\u4e1a\u52a1\u903b\u8f91\u548c\u9a8c\u8bc1\u8fdb\u884c\u4e86\u5265\u79bb\u548c\u89e3\u8026\uff0c\u800c\u4e14\u8fd8\u80fd\u5b9e\u73b0\u81ea\u5b9a\u4e49\u590d\u6742\u9a8c\u8bc1\u3002"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"\u4f46\u662f ",Object(l.b)("inlineCode",{parentName:"strong"},"Mvc")," \u7279\u6027\u9a8c\u8bc1\u65b9\u5f0f\u6709\u51e0\u4e2a\u660e\u663e\u7684\u7f3a\u70b9"),"\uff1a"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u53ea\u80fd\u5728 ",Object(l.b)("inlineCode",{parentName:"li"},"\u63a7\u5236\u5668")," \u4e2d\u7684 ",Object(l.b)("inlineCode",{parentName:"li"},"Action"),"\uff08\u52a8\u4f5c\u65b9\u6cd5\uff09\u4e2d\u4f7f\u7528"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u65e0\u6cd5\u5728\u4efb\u610f\u7c7b\u3001\u4efb\u610f\u65b9\u6cd5\u4e2d\u4f7f\u7528")),Object(l.b)("li",{parentName:"ul"},"\u5185\u7f6e\u7684\u9a8c\u8bc1\u7c7b\u578b\u975e\u5e38\u6709\u9650\uff0c\u4e14\u4e0d\u6613\u62d3\u5c55"),Object(l.b)("li",{parentName:"ul"},"\u4e0d\u652f\u6301\u9a8c\u8bc1\u6d88\u606f\u540e\u671f\u914d\u7f6e")),Object(l.b)("p",null,"\u6240\u4ee5\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u63d0\u4f9b\u4e86\u65b0\u7684\u9a8c\u8bc1\u5f15\u64ce ",Object(l.b)("inlineCode",{parentName:"p"},"DataValidation"),"\uff0c\u5728\u5b8c\u5168\u517c\u5bb9 ",Object(l.b)("inlineCode",{parentName:"p"},"Mvc")," \u5185\u7f6e\u9a8c\u8bc1\u7684\u540c\u65f6\u63d0\u4f9b\u4e86\u5927\u91cf\u5e38\u89c1\u9a8c\u8bc1\u3001\u590d\u6742\u9a8c\u8bc1\u3001\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u7b49\u80fd\u529b\u3002"),Object(l.b)("h2",{id:"84-datavalidation-\u9a8c\u8bc1-"},"8.4 ",Object(l.b)("inlineCode",{parentName:"h2"},"DataValidation")," \u9a8c\u8bc1 \ud83e\udd17"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"DataValidation")," \u662f ",Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u6846\u67b6\u63d0\u4f9b\u4e86\u5168\u65b0\u7684\u9a8c\u8bc1\u65b9\u5f0f\uff0c\u5b8c\u5168\u517c\u5bb9 ",Object(l.b)("inlineCode",{parentName:"p"},"Mvc")," \u5185\u7f6e\u9a8c\u8bc1\uff0c\u5e76\u4e14\u8d4b\u4e88\u4e86\u8d85\u80fd\u3002"),Object(l.b)("h3",{id:"841-datavalidation-\u4f18\u70b9"},"8.4.1 ",Object(l.b)("inlineCode",{parentName:"h3"},"DataValidation")," \u4f18\u70b9"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u5b8c\u5168\u517c\u5bb9 ",Object(l.b)("inlineCode",{parentName:"strong"},"Mvc")," \u5185\u7f6e\u9a8c\u8bc1\u5f15\u64ce")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},"\u5185\u7f6e\u5e38\u89c1\u9a8c\u8bc1\u7c7b\u578b\u53ca\u53ef\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u7c7b\u578b\u529f\u80fd")),Object(l.b)("li",{parentName:"ul"},"\u63d0\u4f9b\u5168\u5c40\u5bf9\u8c61\u62d3\u5c55\u9a8c\u8bc1\u65b9\u5f0f"),Object(l.b)("li",{parentName:"ul"},"\u652f\u6301\u9a8c\u8bc1\u6d88\u606f\u540e\u671f\u914d\u7f6e\uff0c\u652f\u6301\u5b9e\u65f6\u66f4\u65b0"),Object(l.b)("li",{parentName:"ul"},"\u652f\u6301\u5728\u4efb\u4f55\u7c7b\uff0c\u4efb\u4f55\u65b9\u6cd5\u3001\u4efb\u4f55\u4f4d\u7f6e\u5b9e\u73b0\u624b\u52a8\u9a8c\u8bc1\u3001\u7279\u6027\u65b9\u5f0f\u9a8c\u8bc1\u7b49"),Object(l.b)("li",{parentName:"ul"},"\u652f\u6301\u8bbe\u7f6e\u9a8c\u8bc1\u7ed3\u679c\u6a21\u578b")),Object(l.b)("h2",{id:"85-datavalidation-\u4f7f\u7528"},"8.5 ",Object(l.b)("inlineCode",{parentName:"h2"},"DataValidation")," \u4f7f\u7528"),Object(l.b)("div",{className:"admonition admonition-important alert alert--info"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"\u5907\u6ce8")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},Object(l.b)("inlineCode",{parentName:"p"},".AddDataValidation()")," \u9ed8\u8ba4\u5df2\u7ecf\u7ee7\u627f\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"AddInject()")," \u4e2d\u4e86\uff0c\u65e0\u9700\u518d\u6b21\u6ce8\u518c\u3002\u4e5f\u5c31\u662f ",Object(l.b)("inlineCode",{parentName:"p"},"8.5.1")," \u7ae0\u8282\u53ef\u4e0d\u914d\u7f6e\u3002"))),Object(l.b)("h3",{id:"851-\u6ce8\u518c\u9a8c\u8bc1\u670d\u52a1"},"8.5.1 \u6ce8\u518c\u9a8c\u8bc1\u670d\u52a1"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:'{11} title="Fur.Web.Core\\FurWebCoreStartup.cs"',"{11}":!0,title:'"Fur.Web.Core\\FurWebCoreStartup.cs"'}),"using Microsoft.Extensions.DependencyInjection;\n\nnamespace Fur.Web.Core\n{\n    [AppStartup(800)]\n    public sealed class FurWebCoreStartup : AppStartup\n    {\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddControllers()\n                    .AddDataValidation();\n        }\n    }\n}\n")),Object(l.b)("div",{className:"admonition admonition-important alert alert--info"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"\u7279\u522b\u6ce8\u610f")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},Object(l.b)("inlineCode",{parentName:"p"},".AddDataValidation()")," \u9700\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"services.AddControllers()")," \u4e4b\u540e\u6ce8\u518c\u3002"))),Object(l.b)("h3",{id:"852-\u517c\u5bb9-mvc-\u7279\u6027\u9a8c\u8bc1"},"8.5.2 \u517c\u5bb9 ",Object(l.b)("inlineCode",{parentName:"h3"},"Mvc")," \u7279\u6027\u9a8c\u8bc1"),Object(l.b)(b.a,{defaultValue:"testdto",values:[{label:"TestDto",value:"testdto"},{label:"FurAppService",value:"furAppService"}],mdxType:"Tabs"},Object(l.b)(c.a,{value:"testdto",mdxType:"TabItem"},Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,7,10}","{1,7,10}":!0}),'using System.ComponentModel.DataAnnotations;\n\nnamespace Fur.Application\n{\n    public class TestDto\n    {\n        [Range(10, 20, ErrorMessage = "Id \u53ea\u80fd\u5728 10-20 \u533a\u95f4\u53d6\u503c")]\n        public int Id { get; set; }\n\n        [Required(ErrorMessage = "\u5fc5\u586b"), MinLength(3, ErrorMessage = "\u5b57\u7b26\u4e32\u957f\u5ea6\u4e0d\u80fd\u5c11\u4e8e3\u4f4d")]\n        public string Name { get; set; }\n    }\n}\n'))),Object(l.b)(c.a,{value:"furAppService",mdxType:"TabItem"},Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{12,22}","{12,22}":!0}),'using Fur.DynamicApiController;\n\nnamespace Fur.Application\n{\n    public class FurAppService : IDynamicApiController\n    {\n        /// <summary>\n        /// \u503c\u7c7b\u578b\u9a8c\u8bc1\n        /// </summary>\n        /// <param name="id"></param>\n        /// <returns></returns>\n        public int Get(int id)\n        {\n            return id;\n        }\n\n        /// <summary>\n        /// \u5bf9\u8c61\u7c7b\u578b\u9a8c\u8bc1\n        /// </summary>\n        /// <param name="testDto"></param>\n        /// <returns></returns>\n        public TestDto Post(TestDto testDto)\n        {\n            return testDto;\n        }\n    }\n}\n')))),Object(l.b)("p",null,"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("img",{src:Object(r.a)("img/sjyz1.gif")}),Object(l.b)("h3",{id:"853-\u517c\u5bb9-mvc-\u590d\u6742\u9a8c\u8bc1"},"8.5.3 \u517c\u5bb9 ",Object(l.b)("inlineCode",{parentName:"h3"},"Mvc")," \u590d\u6742\u9a8c\u8bc1"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{2,6,14-22}","{2,6,14-22}":!0}),'using System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\n\nnamespace Fur.Application\n{\n    public class TestDto : IValidatableObject\n    {\n        [Range(10, 20, ErrorMessage = "Id \u53ea\u80fd\u5728 10-20 \u533a\u95f4\u53d6\u503c")]\n        public int Id { get; set; }\n\n        [Required(ErrorMessage = "\u5fc5\u586b"), MinLength(3, ErrorMessage = "\u5b57\u7b26\u4e32\u957f\u5ea6\u4e0d\u80fd\u5c11\u4e8e3\u4f4d")]\n        public string Name { get; set; }\n\n        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)\n        {\n            if (Name.StartsWith("Fur"))\n            {\n                yield return new ValidationResult(\n                    "\u4e0d\u80fd\u4ee5 Fur \u5f00\u5934"\n                    , new[] { nameof(Name) }\n                );\n            }\n        }\n    }\n}\n')),Object(l.b)("p",null,"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("img",{src:Object(r.a)("img/sjyz2.gif")}),Object(l.b)("h2",{id:"86-\u624b\u52a8\u9a8c\u8bc1"},"8.6 \u624b\u52a8\u9a8c\u8bc1"),Object(l.b)("h3",{id:"871-\u9a8c\u8bc1\u6a21\u578b"},"8.7.1 \u9a8c\u8bc1\u6a21\u578b"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,11}","{1,11}":!0}),"using Fur.DataValidation;\nusing Fur.DynamicApiController;\n\nnamespace Fur.Application\n{\n    public class FurAppService : IDynamicApiController\n    {\n        [NonValidation] // \u8df3\u8fc7\u5168\u5c40\u9a8c\u8bc1\n        public DataValidationResult Post(TestDto testDto)\n        {\n            return testDto.TryValidate();\n        }\n    }\n}\n")),Object(l.b)("p",null,"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("img",{src:Object(r.a)("img/sjyz3.gif")}),Object(l.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u652f\u6301 ",Object(l.b)("strong",{parentName:"p"},Object(l.b)("inlineCode",{parentName:"strong"},"Mvc"))," \u5185\u7f6e\u7684\u7279\u6027\u9a8c\u8bc1\u3001\u5c5e\u6027\u9a8c\u8bc1\u53ca\u590d\u6742\u7684 ",Object(l.b)("strong",{parentName:"p"},Object(l.b)("inlineCode",{parentName:"strong"},"IValidatableObject"))," \u9a8c\u8bc1\u3002"))),Object(l.b)("h3",{id:"872-validationtypes-\u5e38\u89c1\u9a8c\u8bc1"},"8.7.2 ",Object(l.b)("inlineCode",{parentName:"h3"},"ValidationTypes")," \u5e38\u89c1\u9a8c\u8bc1"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u5185\u7f6e\u4e86\u5f88\u591a\u5e38\u7528\u7c7b\u578b\u7684\u6570\u636e\u9a8c\u8bc1\uff0c\u5305\u62ec\uff1a"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Required"),"\uff1a\u975e\u7a7a\u3001\u975e Null \u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Numeric"),"\uff1a\u6570\u503c\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PositiveNumber"),"\uff1a\u6b63\u6570\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"NegativeNumber"),"\uff1a\u8d1f\u6570\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Integer"),"\uff1a\u6574\u6570\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Money"),"\uff1a\u91d1\u94b1\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Date"),"\uff1a\u65e5\u671f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Time"),"\uff1a\u65f6\u95f4\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IDCard"),"\uff1a\u8eab\u4efd\u8bc1\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PostCode"),"\uff1a\u90ae\u7f16\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PhoneNumber"),"\uff1a\u624b\u673a\u53f7\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Telephone"),"\uff1a\u56fa\u8bdd\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PhoneOrTelNumber"),"\uff1a\u624b\u673a\u6216\u56fa\u8bdd\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"EmailAddress"),"\uff1a\u90ae\u4ef6\u5730\u5740\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Url"),"\uff1a\u7f51\u5740\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Color"),"\uff1a\u989c\u8272\u503c\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Chinese"),"\uff1a\u4e2d\u6587\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IPv4"),"\uff1aIPv4 \u5730\u5740\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IPv6"),"\uff1aIPv6 \u5730\u5740\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Age"),"\uff1a\u5e74\u9f84\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"ChineseName"),"\uff1a\u4e2d\u6587\u540d\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"EnglishName"),"\uff1a\u82f1\u6587\u540d\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Capital"),"\uff1a\u7eaf\u5927\u5199\u82f1\u6587\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Lowercase"),"\uff1a\u7eaf\u5c0f\u5199\u82f1\u6587\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Ascii"),"\uff1aAscii \u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Md5"),"\uff1aMd5 \u5b57\u7b26\u4e32\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Zip"),"\uff1a\u538b\u7f29\u5305\u683c\u5f0f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Image"),"\uff1a\u56fe\u7247\u683c\u5f0f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Document"),"\uff1a\u6587\u6863\u683c\u5f0f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"MP3"),"\uff1aMp3 \u683c\u5f0f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Flash"),"\uff1aFlash \u683c\u5f0f\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Video"),"\uff1a\u89c6\u9891\u6587\u4ef6\u683c\u5f0f\u7c7b\u578b")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"\u4f7f\u7528\u793a\u4f8b")),Object(l.b)(b.a,{defaultValue:"dglx",values:[{label:"\u5355\u4e2a\u7c7b\u578b\u9a8c\u8bc1",value:"dglx"},{label:"\u591a\u4e2a\u7ec4\u5408\u7c7b\u578b\u9a8c\u8bc1",value:"zhlx"}],mdxType:"Tabs"},Object(l.b)(c.a,{value:"dglx",mdxType:"TabItem"},Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs"}),'// \u9a8c\u8bc1\u5fc5\u586b\n"".TryValidate(ValidationTypes.Required);   // => false\n\n// \u9a8c\u8bc1\u4e2d\u6587\n"\u6211\u53eb MonK".TryValidate(ValidationTypes.Chinese); // => false\n\n// \u9a8c\u8bc1\u6570\u503c\n2.TryValidate(ValidationTypes.Numeric); // => true\n\n// \u9a8c\u8bc1\u6574\u6570\ntrue.TryValidate(ValidationTypes.Integer); // => false\n\n// \u9a8c\u8bc1\u90ae\u7bb1\n"monksoul@outlook.com".TryValidate(ValidationTypes.EmailAddress); // => true\n\n// \u9a8c\u8bc1\u8d1f\u6570\n2.0m.TryValidate(ValidationTypes.NegativeNumber); // => false\n\n// \u81ea\u5b9a\u4e49\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\n"Fur".TryValidate("/^Fur$"); // => true\n'))),Object(l.b)(c.a,{value:"zhlx",mdxType:"TabItem"},Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs"}),'// \u9a8c\u8bc1\u6570\u503c\u7c7b\u578b\u4e14\u662f\u6574\u6570\n"20".TryValidate(ValidationTypes.Numeric, ValidationTypes.Integer); // => true\n\n// \u9a8c\u8bc1\u65f6\u65e5\u671f\u6216\u65f6\u95f4\u683c\u5f0f\n"2020-05-20".TryValidate(ValidationOptions.AtLeastOne, ValidationTypes.Date, ValidationTypes.Time); // => true\n"23:45:20".TryValidate(ValidationOptions.AtLeastOne, ValidationTypes.Date, ValidationTypes.Time); // => true\n\n')))),Object(l.b)("div",{className:"admonition admonition-tip alert alert--success"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})))),"\u5c0f\u77e5\u8bc6")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u53ef\u901a\u8fc7\u8bbe\u7f6e ",Object(l.b)("inlineCode",{parentName:"p"},"TryValidate([ValidationOptions], params object[] validationTypes)")," \u65b9\u6cd5\u7684 ",Object(l.b)("inlineCode",{parentName:"p"},"ValidationOptions")," \u53c2\u6570\u914d\u7f6e\u9a8c\u8bc1\u903b\u8f91\uff0c\u5982\uff1a",Object(l.b)("strong",{parentName:"p"},Object(l.b)("inlineCode",{parentName:"strong"},"\u540c\u65f6\u6210\u7acb"))," \u6216 ",Object(l.b)("strong",{parentName:"p"},Object(l.b)("inlineCode",{parentName:"strong"},"\u53ea\u8981\u4e00\u4e2a\u6210\u7acb"))," \u5373\u53ef\u9a8c\u8bc1\u901a\u8fc7"))),Object(l.b)("h3",{id:"873-datavalidation-\u7279\u6027"},"8.7.3 ",Object(l.b)("inlineCode",{parentName:"h3"},"[DataValidation]")," \u7279\u6027"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u8fd8\u63d0\u4f9b\u4e86 ",Object(l.b)("inlineCode",{parentName:"p"},"[DataValidation]")," \u7279\u6027\u65b9\u4fbf\u5728\u6a21\u578b\u53c2\u6570\u4e2d\u4f7f\u7528 ",Object(l.b)("inlineCode",{parentName:"p"},"ValidationTypes")," \u5e38\u89c1\u9a8c\u8bc1\u6216\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u3002"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,7,10,14,17,20}","{1,7,10,14,17,20}":!0}),'using Fur.DataValidation;\n\nnamespace Fur.Application\n{\n    public class TestDto\n    {\n        [DataValidation(ValidationTypes.Integer)]\n        public int Id { get; set; }\n\n        [DataValidation(ValidationTypes.Numeric, ValidationTypes.Integer)]\n        public int Cost { get; set; }\n\n        [DataValidation(ValidationOptions.AtLeastOne, ValidationTypes.Chinese, ValidationTypes.Date)]\n        public string Name { get; set; }\n\n        // \u53ef\u4ee5\u548cMvc\u7279\u6027\u5171\u5b58\n        [Required, DataValidation(ValidationTypes.Age)]\n        public int Age { get; set; }\n\n        [DataValidation(ValidationTypes.IDCard, ErrorMessage = "\u81ea\u5b9a\u4e49\u8eab\u4efd\u8bc1\u63d0\u793a\u6d88\u606f")]\n        public string IDCard { get; set; }\n    }\n}\n')),Object(l.b)("h2",{id:"87-nonvalidation-\u8df3\u8fc7\u9a8c\u8bc1"},"8.7 ",Object(l.b)("inlineCode",{parentName:"h2"},"[NonValidation]")," \u8df3\u8fc7\u9a8c\u8bc1"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u6846\u67b6\u63d0\u4f9b\u4e86\u5bf9\u8c61\u6a21\u578b\u8df3\u8fc7\u9a8c\u8bc1\u7279\u6027 ",Object(l.b)("inlineCode",{parentName:"p"},"[NonValidation]"),"\uff0c\u652f\u6301\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"\u63a7\u5236\u5668"),"\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"\u52a8\u4f5c\u65b9\u6cd5"),"\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"\u7c7b")," \u4e2d\u4f7f\u7528\u3002"),Object(l.b)("p",null,"\u4e00\u65e6\u8d34\u4e86\u6b64\u7279\u6027\uff0c\u90a3\u4e48\u5c06\u4e0d\u4f1a\u6267\u884c\u9a8c\u8bc1\u64cd\u4f5c\u3002"),Object(l.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},Object(l.b)("strong",{parentName:"p"},Object(l.b)("inlineCode",{parentName:"strong"},"[NonValidation]"))," \u53ea\u5bf9\u5bf9\u8c61\u7c7b\u578b\u6709\u6548\uff0c\u503c\u7c7b\u578b\u65e0\u6548\u3002"))),Object(l.b)("h2",{id:"88-\u9ad8\u7ea7\u81ea\u5b9a\u4e49\u64cd\u4f5c"},"8.8 \u9ad8\u7ea7\u81ea\u5b9a\u4e49\u64cd\u4f5c"),Object(l.b)("h3",{id:"881-\u81ea\u5b9a\u4e49-validationtypes-\u7c7b\u578b"},"8.8.1 \u81ea\u5b9a\u4e49 ",Object(l.b)("inlineCode",{parentName:"h3"},"ValidationTypes")," \u7c7b\u578b"),Object(l.b)("p",null,"\u9664\u4e86 ",Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u5185\u7f6e\u7684\u9a8c\u8bc1\u7c7b\u578b\u4ee5\u5916\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u8fd8\u63d0\u4f9b\u4e86\u975e\u5e38\u7075\u6d3b\u7684\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u7c7b\u578b\u673a\u5236\u3002"),Object(l.b)("p",null,"\u5b9e\u73b0\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u7c7b\u578b\u5fc5\u987b\u9075\u5faa\u4ee5\u4e0b\u914d\u7f6e\uff1a"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u9a8c\u8bc1\u7c7b\u578b\u5fc5\u987b\u65f6\u516c\u5f00\u4e14\u662f ",Object(l.b)("inlineCode",{parentName:"li"},"Enum")," \u679a\u4e3e\u7c7b\u578b"),Object(l.b)("li",{parentName:"ul"},"\u679a\u4e3e\u7c7b\u578b\u5fc5\u987b\u8d34\u6709 ",Object(l.b)("inlineCode",{parentName:"li"},"[ValidationType]")," \u7279\u6027"),Object(l.b)("li",{parentName:"ul"},"\u679a\u4e3e\u4e2d\u6bcf\u4e00\u9879\u5fc5\u987b\u8d34\u6709 ",Object(l.b)("inlineCode",{parentName:"li"},"[ValidationItemMetadata]")," \u7279\u6027")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"\u5982"),"\uff1a"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,6,12,18}","{1,6,12,18}":!0}),'using Fur.DataValidation;\nusing System.Text.RegularExpressions;\n\nnamespace Fur.Application\n{\n    [ValidationType]\n    public enum MyValidationTypes\n    {\n        /// <summary>\n        /// \u5f3a\u5bc6\u7801\u7c7b\u578b\n        /// </summary>\n        [ValidationItemMetadata(@"^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$", "\u5fc5\u987b\u987b\u5305\u542b\u5927\u5c0f\u5199\u5b57\u6bcd\u548c\u6570\u5b57\u7684\u7ec4\u5408\uff0c\u4e0d\u80fd\u4f7f\u7528\u7279\u6b8a\u5b57\u7b26\uff0c\u957f\u5ea6\u57288-10\u4e4b\u95f4")]\n        StrongPassword,\n\n        /// <summary>\n        /// \u4ee5 Fur \u5b57\u7b26\u4e32\u5f00\u5934\uff0c\u5ffd\u7565\u5927\u5c0f\u5199\n        /// </summary>\n        [ValidationItemMetadata(@"^(fur).*", "\u9ed8\u8ba4\u63d0\u793a\uff1a\u5fc5\u987b\u4ee5Fur\u5b57\u7b26\u4e32\u5f00\u5934\uff0c\u5ffd\u7565\u5927\u5c0f\u5199", RegexOptions.IgnoreCase)]\n        StartWithFurString\n    }\n}\n\n')),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"\u4f7f\u7528")),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u624b\u52a8\u4f7f\u7528")),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs"}),'"q1w2e3".TryValidate(MyValidationTypes.StrongPassword); // => false\n\n"furos".TryValidate(MyValidationTypes.StartWithFurString); // => true\n')),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"[DataValidation]")," \u4e2d\u4f7f\u7528")),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs"}),"[DataValidation(MyValidationTypes.StrongPassword)]\npublic string Password { get; set; }\n")),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u591a\u4e2a\u81ea\u5b9a\u4e49\u7c7b\u578b\u6df7\u7528")),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs"}),'"Q1w2e3r4t5!*".TryValidate(MyValidationTypes.StrongPassword, ValidationTypes.Required); // => true\n')),Object(l.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})))),"\u7279\u522b\u6ce8\u610f")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u81ea\u5b9a\u4e49\u7684\u9a8c\u8bc1\u7c7b\u578b\u4e5f\u8981\u4fdd\u8bc1\u540d\u79f0\u5168\u5c40\u552f\u4e00\uff0c\u4e5f\u5c31\u662f\u591a\u4e2a\u9a8c\u8bc1\u7c7b\u578b\u4e0d\u80fd\u51fa\u73b0\u4e00\u6837\u7684\u540d\u5b57\u3002"))),Object(l.b)("h3",{id:"882-\u81ea\u5b9a\u4e49-validationtypes-\u5931\u8d25\u6d88\u606f"},"8.8.2 \u81ea\u5b9a\u4e49 ",Object(l.b)("inlineCode",{parentName:"h3"},"ValidationTypes")," \u5931\u8d25\u6d88\u606f"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u5185\u7f6e\u7684 ",Object(l.b)("inlineCode",{parentName:"p"},"ValidationTypes")," \u5df2\u6709\u9ed8\u8ba4\u7684\u5931\u8d25\u6d88\u606f\uff1a"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Required"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is required.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Numeric"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a numeric type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PositiveNumber"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a positive number type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"NegativeNumber"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a negative number type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Integer"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a integer type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Money"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a money type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Date"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a date type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Time"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a time type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IDCard"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a idcard type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PostCode"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a postcode type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PhoneNumber"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a phone number type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Telephone"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a telephone type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"PhoneOrTelNumber"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a phone number or telephone type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"EmailAddress"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a email address type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Url"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a url address type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Color"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a color type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Chinese"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a chinese type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IPv4"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a IPv4 type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"IPv6"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a IPv6 type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Age"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a age type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"ChineseName"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a chinese name type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"EnglishName"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a english name type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Capital"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a capital type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Lowercase"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a lowercase type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Ascii"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a ascii type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Md5"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a md5 type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Zip"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a zip type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Image"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a image type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Document"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a document type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"MP3"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a mp3 type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Flash"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a flash type.")),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"Video"),"\uff1a",Object(l.b)("strong",{parentName:"li"},"The Value is not a video type."))),Object(l.b)("p",null,"\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u7ee7\u627f ",Object(l.b)("inlineCode",{parentName:"p"},"IValidationMessageTypeProvider")," \u9a8c\u8bc1\u6d88\u606f\u63d0\u4f9b\u5668\u7c7b\u578b\uff0c\u6216\u901a\u8fc7 ",Object(l.b)("inlineCode",{parentName:"p"},"appsettings.json")," \u914d\u7f6e\u3002"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},Object(l.b)("inlineCode",{parentName:"strong"},"[ValidationMessageType]"))," \u65b9\u5f0f")),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{5,9,12,15,19,22}","{5,9,12,15,19,22}":!0}),'using Fur.DataValidation;\n\nnamespace Fur.Application\n{\n    [ValidationMessageType]\n    public enum MyValidationMessageType\n    {\n        // \u4fee\u6539\u5185\u7f6e\u9a8c\u8bc1\u7c7b\u578b\u9a8c\u8bc1\u5931\u8d25\u6d88\u606f\n        [ValidationMessage("\u503c\u4e0d\u80fd\u4e3a\u7a7a\u6216Null")]\n        Required,\n\n        [ValidationMessage("\u5fc5\u987b\u662f\u6570\u503c\u7c7b\u578b")]\n        Numeric,\n\n        [ValidationMessage("\u5fc5\u987b\u662f\u6b63\u6570")]\n        PositiveNumber,\n\n        // \u4fee\u6539\u81ea\u5b9a\u4e49\u7c7b\u578b\u9a8c\u8bc1\u5931\u8d25\u6d88\u606f\n        [ValidationMessage("\u5bc6\u7801\u592a\u7b80\u5355\u4e86")]\n        StrongPassword,\n\n        [ValidationMessage("\u5fc5\u987b\u4ee5 Fur \u5f00\u5934")]\n        StartWithFurString\n    }\n}\n')),Object(l.b)("div",{className:"admonition admonition-tip alert alert--success"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})))),"\u5c0f\u77e5\u8bc6")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u9664\u4e86\u8d34 ",Object(l.b)("inlineCode",{parentName:"p"},"[ValidationMessageType]")," \u7279\u6027\u5916\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u6846\u67b6\u8fd8\u63d0\u4f9b\u4e86 ",Object(l.b)("inlineCode",{parentName:"p"},"IValidationMessageTypeProvider")," \u65b9\u5f0f\u67e5\u627e\u9a8c\u8bc1\u6d88\u606f\u7c7b\u578b\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("pre",{parentName:"div"},Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,6,8-12}","{1,6,8-12}":!0}),"using Fur.DataValidation;\nusing System;\n\nnamespace Fur.Application\n{\n    public class MyValidationTypeMessageProvider : IValidationMessageTypeProvider\n    {\n        public Type[] Definitions => new[]\n        {\n            typeof(MyValidationMessageType),\n            typeof(MyValidationMessageType2)\n        };\n    }\n}\n")),Object(l.b)("p",{parentName:"div"},"\u6ce8\u518c\u9a8c\u8bc1\u6d88\u606f\u63d0\u4f9b\u5668"),Object(l.b)("pre",{parentName:"div"},Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:'{11} title="Fur.Web.Core\\FurWebCoreStartup.cs"',"{11}":!0,title:'"Fur.Web.Core\\FurWebCoreStartup.cs"'}),"using Microsoft.Extensions.DependencyInjection;\n\nnamespace Fur.Web.Core\n{\n    [AppStartup(800)]\n    public sealed class FurWebCoreStartup : AppStartup\n    {\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddControllers()\n                    .AddDataValidation<MyValidationTypeMessageProvider>();\n        }\n    }\n}\n")))),Object(l.b)("p",null,"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("img",{src:Object(r.a)("img/sjyz4.png")}),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},Object(l.b)("strong",{parentName:"li"},Object(l.b)("inlineCode",{parentName:"strong"},"appsettings.json")," \u65b9\u5f0f"))),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json",metastring:'{2-9} title="Fur.Web.Entry/appsettings.json"',"{2-9}":!0,title:'"Fur.Web.Entry/appsettings.json"'}),'{\n  "ValidationTypeMessageSettings": {\n    "Definitions": [\n      ["Required", "\u503c\u4e0d\u80fd\u4e3a\u7a7a\u6216Null"],\n      ["Numeric", "\u5fc5\u987b\u662f\u6570\u503c\u7c7b\u578b"],\n\n      ["StrongPassword", "\u5bc6\u7801\u592a\u7b80\u5355\u4e86!!!"]\n    ]\n  }\n}\n')),Object(l.b)("div",{className:"admonition admonition-important alert alert--info"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})))),"important")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},Object(l.b)("inlineCode",{parentName:"p"},"appsettings.json")," \u4e2d\u76f8\u540c\u7684 ",Object(l.b)("inlineCode",{parentName:"p"},"Key")," \u4f1a\u8986\u76d6 ",Object(l.b)("inlineCode",{parentName:"p"},"IValidationMessageTypeProvider")," \u63d0\u4f9b\u76f8\u540c ",Object(l.b)("inlineCode",{parentName:"p"},"Key")," \u7684\u503c\u3002"))),Object(l.b)("h4",{id:"\u9519\u8bef\u6d88\u606f\u67e5\u627e\u4f18\u5148\u7ea7"},"\u9519\u8bef\u6d88\u606f\u67e5\u627e\u4f18\u5148\u7ea7"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"DefaultErrorMessage")," -> ",Object(l.b)("inlineCode",{parentName:"p"},"IValidationMessageTypeProvider")," -> ",Object(l.b)("inlineCode",{parentName:"p"},"appsettings.json")," (",Object(l.b)("strong",{parentName:"p"},"\u4f4e -> \u9ad8"),")"),Object(l.b)("h2",{id:"89-\u6a21\u578b\u9a8c\u8bc1\u8303\u56f4"},"8.9 \u6a21\u578b\u9a8c\u8bc1\u8303\u56f4"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"Fur")," \u63d0\u4f9b\u591a\u79cd\u6a21\u578b\u9a8c\u8bc1\u8303\u56f4\u8bbe\u7f6e\uff1a"),Object(l.b)("ul",null,Object(l.b)("li",{parentName:"ul"},"\u5168\u5c40\u9a8c\u8bc1\uff08\u9ed8\u8ba4\uff09"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"[NonValidation]")," \u8df3\u8fc7\u9a8c\u8bc1"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"[TypeFilter(typeof(DataValidationFilter))]")," \u5c40\u90e8\u9a8c\u8bc1"),Object(l.b)("li",{parentName:"ul"},Object(l.b)("inlineCode",{parentName:"li"},"[ApiController]")," \u63a7\u5236\u5668\u8303\u56f4\u9a8c\u8bc1")),Object(l.b)("h3",{id:"891-\u5168\u5c40\u9a8c\u8bc1"},"8.9.1 \u5168\u5c40\u9a8c\u8bc1"),Object(l.b)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u901a\u8fc7 ",Object(l.b)("inlineCode",{parentName:"p"},".AddDataValidation()")," \u6ce8\u518c\u6570\u636e\u9a8c\u8bc1\u670d\u52a1\u5df2\u7ecf\u542f\u7528\u4e86\u5168\u5c40\u9a8c\u8bc1\uff0c\u5982\u82e5\u4e0d\u60f3\u542f\u7528\u5168\u5c40\u9a8c\u8bc1\uff0c\u5219\u4f20\u5165 ",Object(l.b)("inlineCode",{parentName:"p"},"false")," \u5373\u53ef\uff0c\u5982\uff1a",Object(l.b)("inlineCode",{parentName:"p"},".AddDataValidation(false)"),"\u3002"),Object(l.b)("h3",{id:"892-nonvalidation-\u8df3\u8fc7\u9a8c\u8bc1"},"8.9.2 ",Object(l.b)("inlineCode",{parentName:"h3"},"[NonValidation]")," \u8df3\u8fc7\u9a8c\u8bc1"),Object(l.b)("p",null,"\u53ef\u901a\u8fc7 ",Object(l.b)("inlineCode",{parentName:"p"},"[NonValidation]")," \u8d34\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"\u63a7\u5236\u5668"),"\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"\u52a8\u4f5c\u65b9\u6cd5"),"\uff0c",Object(l.b)("inlineCode",{parentName:"p"},"\u7c7b")," \u4e2d\u8df3\u8fc7\u5168\u5c40\u9a8c\u8bc1\u6216\u4e0d\u9700\u8981\u9a8c\u8bc1"),Object(l.b)("h3",{id:"893-typefiltertypeofdatavalidationfilter-\u5c40\u90e8\u9a8c\u8bc1"},"8.9.3 ",Object(l.b)("inlineCode",{parentName:"h3"},"[TypeFilter(typeof(DataValidationFilter))]")," \u5c40\u90e8\u9a8c\u8bc1"),Object(l.b)("p",null,"\u6211\u4eec\u4e5f\u53ef\u4ee5\u65e0\u9700\u6ce8\u518c ",Object(l.b)("inlineCode",{parentName:"p"},".AddDataValidation()")," \u670d\u52a1\uff0c\u76f4\u63a5\u5728 ",Object(l.b)("inlineCode",{parentName:"p"},"\u52a8\u4f5c\u65b9\u6cd5")," \u4e0a\u8d34 ",Object(l.b)("inlineCode",{parentName:"p"},"[TypeFilter(typeof(DataValidationFilter))]")," \u53ef\u542f\u7528\u5c40\u90e8\u9a8c\u8bc1\u3002\u5982\uff1a"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,3,9}","{1,3,9}":!0}),"using Fur.DataValidation;\nusing Fur.DynamicApiController;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace Fur.Application\n{\n    public class FurAppService : IDynamicApiController\n    {\n        [TypeFilter(typeof(DataValidationFilter))]\n        public TestDto Post(TestDto testDto)\n        {\n            return testDto;\n        }\n    }\n}\n")),Object(l.b)("h3",{id:"894-apicontroller-\u63a7\u5236\u5668\u8303\u56f4\u9a8c\u8bc1"},"8.9.4 ",Object(l.b)("inlineCode",{parentName:"h3"},"[ApiController]")," \u63a7\u5236\u5668\u8303\u56f4\u9a8c\u8bc1"),Object(l.b)("p",null,Object(l.b)("inlineCode",{parentName:"p"},"[ApiController]")," \u662f ",Object(l.b)("inlineCode",{parentName:"p"},"Mvc")," \u63d0\u4f9b\u7684\u63a7\u5236\u5668\u8303\u56f4\uff08\u542b\u6240\u6709\u52a8\u4f5c\u65b9\u6cd5\uff09\u7684\u9a8c\u8bc1\u3002"),Object(l.b)("pre",null,Object(l.b)("code",Object(a.a)({parentName:"pre"},{className:"language-cs",metastring:"{1,5}","{1,5}":!0}),"using Microsoft.AspNetCore.Mvc;\n\nnamespace Fur.Web.Entry.Controllers\n{\n    [ApiController]\n    public class MvcController : Controller\n    {\n        public IActionResult Index()\n        {\n            return View();\n        }\n    }\n}\n")),Object(l.b)("h2",{id:"810-miniprofiler-\u67e5\u770b"},"8.10 ",Object(l.b)("inlineCode",{parentName:"h2"},"MiniProfiler")," \u67e5\u770b"),Object(l.b)("p",null,"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"),Object(l.b)("img",{src:Object(r.a)("img/sjyz5.png")}),Object(l.b)("h2",{id:"810-\u591a\u8bed\u8a00\u652f\u6301"},"8.10 \u591a\u8bed\u8a00\u652f\u6301"),Object(l.b)("p",null,"\u6587\u6863\u6574\u7406\u4e2d..."),Object(l.b)("h2",{id:"811-\u9a8c\u8bc1\u6a21\u578b\u63d0\u4f9b\u5668"},"8.11 \u9a8c\u8bc1\u6a21\u578b\u63d0\u4f9b\u5668"),Object(l.b)("p",null,"\u6587\u6863\u6574\u7406\u4e2d..."),Object(l.b)("h2",{id:"812-\u53cd\u9988\u4e0e\u5efa\u8bae"},"8.12 \u53cd\u9988\u4e0e\u5efa\u8bae"),Object(l.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(l.b)("h5",{parentName:"div"},Object(l.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(l.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(l.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"\u4e0e\u6211\u4eec\u4ea4\u6d41")),Object(l.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(l.b)("p",{parentName:"div"},"\u7ed9 Fur \u63d0 ",Object(l.b)("a",Object(a.a)({parentName:"p"},{href:"https://gitee.com/monksoul/Fur/issues/new?issue"}),"Issue"),"\u3002"))))}m.isMDXComponent=!0}}]);