{"id":273,"date":"2017-08-22T23:55:23","date_gmt":"2017-08-22T14:55:23","guid":{"rendered":"http:\/\/reasty.net\/?p=273"},"modified":"2017-08-22T23:55:23","modified_gmt":"2017-08-22T14:55:23","slug":"28%ec%9e%a5-%ed%8f%bc-%ec%9c%a0%ed%9a%a8%ec%84%b1-%ea%b2%80%ec%82%ac%ec%99%80-%eb%aa%a8%eb%8d%b8-%eb%b0%94%ec%9d%b8%eb%94%a9","status":"publish","type":"post","link":"https:\/\/reasty.net\/?p=273","title":{"rendered":"28\uc7a5 \ud3fc \uc720\ud6a8\uc131 \uac80\uc0ac\uc640 \ubaa8\ub378 \ubc14\uc778\ub529"},"content":{"rendered":"<h1>28.1. \ud3fc \uc720\ud6a8\uc131 \uac80\uc0ac<\/h1>\n<p>\ub2e4\uc591\ud55c \uc785\ub825\uac12 Validation \ubc29\ubc95<\/p>\n<ul>\n<li>\uc21c\uc218 HTML \ubc0f \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc0ac\uc6a9<\/li>\n<li>\ud0dc\uadf8 \ud5ec\ud37c \uc0ac\uc6a9<\/li>\n<li>System.ComponentModel.DataAnnotations \ub124\uc784\uc2a4\ud398\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubaa8\ub378 \ucc28\uc6d0\uc5d0\uc11c \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc9c0\uc6d0\ud55c\ub2e4.<\/li>\n<\/ul>\n<h1>28.2. \ubaa8\ub378 \uba54\ud0c0\ub370\uc774\ud130<\/h1>\n<p>\uc790\uc8fc \uc0ac\uc6a9\ub418\ub294 \ubaa8\ub378 \uba54\ud0c0\ub370\uc774\ud130<\/p>\n<ul>\n<li>Required &#8211; \ud544\uc218 \uc785\ub825\uc694\uc18c, SQL \uc81c\uc57d \uc870\uac74\uc758 NOT NULL<\/li>\n<li>StringLength &#8211; \ubb38\uc790\uc5f4\uc758 \uae38\uc774\uc81c\ud55c<\/li>\n<li>Display &#8211; \ub808\uc774\ube14 \ub4f1\uc5d0 \ud45c\uc2dc\ud560 \ud14d\uc2a4\ud2b8<\/li>\n<li>DataType &#8211; \uc554\ud638 \ub610\ub294 \uc774\uba54\uc77c \ud615\uc2dd\uc744 \uc9c0\uc815<\/li>\n<li>MinLength &#8211; \ubb38\uc790\uc5f4 \ucd5c\uc18c\uae38\uc774 \uc9c0\uc815<\/li>\n<li>MaxLengh &#8211; \ubb38\uc790\uc5f4 \ucd5c\ub300\uae30\uc774 \uc9c0\uc815<\/li>\n<li>RegularExpression &#8211; \uc815\uaddc\uc2dd\uc744 \uc0ac\uc6a9\ud574 \uc81c\uc57d \uc870\uac74 \ubd80\uc5ec<\/li>\n<li>Range &#8211; \ubc94\uc704 \uc9c0\uc815<\/li>\n<li>Compare &#8211; \ud2b9\uc815\uac12\uacfc \ube44\uad50, \uc554\ud638 \ud655\uc778 \uc6a9\ub3c4\ub85c \uc8fc\ub85c \uc0ac\uc6a9<\/li>\n<\/ul>\n<h1>28.3. \uac15\ub825\ud55c \ud615\uc2dd\uc758 \ubdf0<\/h1>\n<p><em><strong>@model<\/strong><\/em> \ud0a4\uc6cc\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud574\ub2f9 \ubdf0\uc5d0\uc11c \uc0ac\uc6a9\ud560 \ubaa8\ub378 \ud074\ub798\uc2a4\ub97c \uc9c0\uc815\ud55c\ub2e4.<\/p>\n<h1>28.4. \ubaa8\ub378 \ubc14\uc778\ub529<\/h1>\n<p><em>HttpPost<\/em>\ub85c \uc804\uc1a1\ub41c \ub370\uc774\ud130\ub97c C#\uc758 \ubaa8\ub378 \ud074\ub798\uc2a4\uc5d0 \ub2f4\uc544\uc11c \uc561\uc158 \uba54\uc11c\ub4dc\uc5d0 \uc804\ub2ec\ud558\ub294 \uae30\ubc95.<br \/>\n\ud3fc \uceec\ub809\uc158\uacfc \ucffc\ub9ac \uc2a4\ud2b8\ub9c1\uc744 \ubd84\uc11d\ud574\uc11c <strong>\uc561\uc158 \uba54\uc11c\ub4dc\uc758 \ub9e4\uac1c \ubcc0\uc218\uc5d0 \ub9e4\ud551<\/strong>\ud574\uc8fc\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4.<\/p>\n<h2>28.4.1. ModelState.IsValid \uc18d\uc131<\/h2>\n<p><em>HttpPost<\/em>\ub85c \uc804\uc1a1\ub41c \ub370\uc774\ud130\uac00 \ubaa8\ub378\uc5d0\uc11c \uc81c\uc2dc\ud55c \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \ud1b5\uacfc\ud588\ub294\uc9c0 \uc548\ud588\ub294\uc9c0\ub97c \ud310\ub2e8\ud558\ub294 \uc18d\uc131. <strong>(\uc11c\ubc84\uce21 \uc720\ud6a8\uc131 \uac80\uc0ac)<\/strong><\/p>\n<h1>28.5. \uc2e4\uc2b5<\/h1>\n<p>\ubaa8\ub378 \ubc14\uc778\ub529 : \uac01\uac01\uc758 \ub9e4\uac1c \ubcc0\uc218\ub97c \uadf8\uc640 \uc774\ub984\uc774 \uac19\uc740 \ubaa8\ub378 \ud074\ub798\uc2a4\uc758 \uc18d\uc131\uc73c\ub85c \uc790\ub3d9\uc73c\ub85c \uc5f0\uacb0\ud574 \uc8fc\ub294 \uae30\ub2a5<\/p>\n<p>@Html.TextBoxFor() \ud5ec\ud37c \uba54\uc11c\ub4dc\uc5d0 \uc758\ud574 <em>data-val-required<\/em> \ucc98\ub7fc <strong><em>data-<\/em><\/strong>\ub85c \uc2dc\uc791\ud558\ub294 <strong>\ucee4\uc2a4\ud140 \uc18d\uc131<\/strong>\uc774 \ucd94\uac00\ub41c\ub2e4. \uc774\ub7ec\ud55c \uc18d\uc131\uc740 \ud074\ub77c\uc774\uc5b8\ud2b8 \uae30\ubc18 \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc9c4\ud589\ud560 \ub54c \uc720\uc6a9\ud558\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>28.1. \ud3fc \uc720\ud6a8\uc131 \uac80\uc0ac \ub2e4\uc591\ud55c \uc785\ub825\uac12 Validation \ubc29\ubc95 \uc21c\uc218 HTML \ubc0f \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc0ac\uc6a9 \ud0dc\uadf8 \ud5ec\ud37c \uc0ac\uc6a9 System.ComponentModel.DataAnnotations \ub124\uc784\uc2a4\ud398\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubaa8\ub378 \ucc28\uc6d0\uc5d0\uc11c \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc9c0\uc6d0\ud55c\ub2e4. 28.2. \ubaa8\ub378 \uba54\ud0c0\ub370\uc774\ud130 \uc790\uc8fc \uc0ac\uc6a9\ub418\ub294 \ubaa8\ub378 \uba54\ud0c0\ub370\uc774\ud130 Required &#8211; \ud544\uc218 \uc785\ub825\uc694\uc18c, SQL \uc81c\uc57d \uc870\uac74\uc758 NOT NULL StringLength &#8211; \ubb38\uc790\uc5f4\uc758 \uae38\uc774\uc81c\ud55c Display &#8211; \ub808\uc774\ube14 \ub4f1\uc5d0 \ud45c\uc2dc\ud560 \ud14d\uc2a4\ud2b8 DataType &#8211; \uc554\ud638 \ub610\ub294 \uc774\uba54\uc77c \ud615\uc2dd\uc744 \uc9c0\uc815 MinLength &#8211; \ubb38\uc790\uc5f4&#8230; <a href=\"https:\/\/reasty.net\/?p=273\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,14],"tags":[18,19,21],"class_list":["post-273","post","type-post","status-publish","format-standard","hentry","category-asp-net-core","category-asp-net-core-net","tag-asp-net-core","tag-asp-net-korea-study-group","tag-c"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273"}],"version-history":[{"count":0,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions"}],"wp:attachment":[{"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}