Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: validate value type short

$
0
0
thanks, before loading the plugin "jquery.validate.unobtrusive" I added this command line
$(document).removeData("validator");

            $("input[data-val-number]").each(function (index, el) {
                var re = new RegExp("The field (.*?) must be a number.");
                var string = $(this).attr("data-val-number");
                var m = string.match(re);
                if (m != null && m.length > 1) {
                    $(this).attr("data-val-number", string.replace(m[0], "O campo " + m[1] + " precisa ser numérico"));
                }
            });
My last question is possible to create properties in the HTML tag fluentvalidation

Exemple:
RuleFor(t => t.GroupId).createtag("data-example='Text'")

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>