forked from plusone/plusone-commons
依赖 commons-lang3。
This commit is contained in:
@@ -33,7 +33,7 @@ public abstract class ValidatableStringRecord {
|
||||
|
||||
protected ValidatableStringRecord(String value, Pattern pattern) {
|
||||
Assert.notNull(pattern, "The pattern must not be null.");
|
||||
Assert.hasText(value, "The value must be has text.");
|
||||
Assert.isNotBlank(value, "The value must be has text.");
|
||||
Assert.isTrue(pattern.matcher(value).matches());
|
||||
this.value = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user