In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to use spring to achieve field verification in Java. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Limit description @ Null limit can only be null@NotNull limit must not be null@AssertFalse limit must be false@AssertTrue limit must be true@DecimalMax (value) limit must be a number not greater than the specified value @ DecimalMin (value) limit must be a number not less than the specified value @ Digits (integer,fraction) limit must be a decimal, and the number of digits of the integer cannot exceed integer The number of decimal places cannot exceed the fraction@Future limit must be a future date @ Max (value) limit must be a number not greater than the specified value @ Min (value) limit must be a number not less than the specified value @ Past limit must be a past date @ Pattern (value) limit must conform to the specified regular expression @ Size (max) Min) limit character length must be between min and max @ Past validation annotation element value (date type) earlier than the current time @ NotEmpty verification annotation element value is not null and is not empty (string length is not 0, collection size is not 0) @ NotBlank verification annotation element value is not empty (not null, length is 0 after removing the first space) Unlike @ NotEmpty,@NotBlank, which applies only to strings and removes string spaces during comparison, @ Email verifies that the element value of the annotation is Email, or you can specify a custom email format through regular expressions and flag
Hiberate Validator also supports the following annotations
The annotation function states that the annotated element of @ Email must be an email address @ Length. The size of the annotated string must be within the specified range. @ NotEmpty annotated string must be non-empty @ Range annotated element must be within the appropriate scope. How to use spring in Java to implement field verification is shared here. I hope the above content can be helpful to you and you can learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.