{"id":262,"date":"2021-04-15T21:49:18","date_gmt":"2021-04-15T12:49:18","guid":{"rendered":"https:\/\/mvc.auctionpro.co.kr\/?p=262"},"modified":"2021-04-15T21:49:18","modified_gmt":"2021-04-15T12:49:18","slug":"validation-sample","status":"publish","type":"post","link":"https:\/\/mvc.auctionpro.co.kr\/?p=262","title":{"rendered":"validation  sample"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-263\" src=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/04\/validate.jpg\" alt=\"\" width=\"406\" height=\"361\" srcset=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/04\/validate.jpg 406w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/04\/validate-300x267.jpg 300w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/p>\n<pre class=\"lang:default decode:true \" >using System.ComponentModel.DataAnnotations;\r\n\r\nnamespace UnitTestArticle.Models\r\n{\r\n    public class TransferMoneyModel\r\n    {\r\n        [Display(Name =\"Source Account Number\")]\r\n        [Required]\r\n        [MinLength(10), MaxLength(10)]\r\n        public string SourceAccountNumber { get; set; }\r\n\r\n        [Display(Name = \"Destination Account Number\")]\r\n        [Required]\r\n        [MinLength(10), MaxLength(10)]\r\n        public string DestinationAccountNumber { get; set; }\r\n\r\n        [Display(Name = \"Amount\")]\r\n        [Required]\r\n        [Range(0.01,1000000)]\r\n        public decimal Amount { get; set; }\r\n    }\r\n}<\/pre>\n<pre class=\"lang:default decode:true \" >@model TransferMoneyModel\r\n@{\r\n    ViewBag.Title = \"TransferMoney\";\r\n}\r\n\r\n&lt;h2&gt;Transfer Money&lt;\/h2&gt;\r\n\r\n@Html.ValidationSummary()\r\n\r\n@using (Html.BeginForm())\r\n{\r\n    &lt;div class=\"form-group\"&gt;\r\n        @Html.LabelFor(m =&gt; m.SourceAccountNumber)\r\n        @Html.TextBoxFor(m =&gt; m.SourceAccountNumber, new { @class = \"form-control\" })\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        @Html.LabelFor(m =&gt; m.DestinationAccountNumber)\r\n        @Html.TextBoxFor(m =&gt; m.DestinationAccountNumber, new { @class = \"form-control\" })\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        @Html.LabelFor(m =&gt; m.Amount)\r\n        @Html.TextBoxFor(m =&gt; m.Amount, new { @class = \"form-control\", type=\"number\" })\r\n    &lt;\/div&gt;\r\n\r\n    &lt;button type=\"submit\" class=\"btn btn-primary\"&gt;Transfer&lt;\/button&gt;\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>using System.ComponentModel.DataAnnotations; namespace UnitTestArticle.Models { public class TransferMoneyModel { [Display(Name =&#8221;Source Account Number&#8221;)] [Required] [MinLength(10), MaxLength(10)] public string SourceAccountNumber { get; set; } [Display(Name = &#8220;Destination Account Number&#8221;)] [Required] [MinLength(10), MaxLength(10)] public string DestinationAccountNumber { get; set; } [Display(Name = &#8220;Amount&#8221;)] [Required] [Range(0.01,1000000)] public decimal Amount { get; set; } } } @model TransferMoneyModel @{\u2026 <span class=\"read-more\"><a href=\"https:\/\/mvc.auctionpro.co.kr\/?p=262\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":1,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}