Replies: 1 comment 3 replies
-
@alex-kar Can you comment on this? All the xxxProp classes are here for reference. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ref Issue #587
The current validation methods are very long and wordy. They are very clear in meaning, e.g.
mustMatchRegex
, however, it makes Property builder strings soooo looong... I'm guessing the meanings are clear enough w/o the extra words.I'd also like to purge deprecated methods with the 0.5.0 release, so if the old methods are going to be deprecated and renamed, perhaps it should be now in the 04.2 release. The actual change would be relatively easy.
In general, It makes sense to follow the pattern of existing methods. For String that is easy. Here are the current validation methods in StrProp and proposed new names:
String.matches(regex)
String.startsWith(prefix)
String.startsWith(prefix)
String.endsWith(suffix)
(sufix is misspelled on this method)assertNotNull
Missing from that list is
oneOfIgnoreCase
- This method is missing and should be another ticket.Things are less clear for numeric Properties like IntProp, BigDecProp, etc. There is no obvious example to follow that I can think of. Here are some proposed method names a numeric Property, but I've no idea what the best and most clear names would be:
Beta Was this translation helpful? Give feedback.
All reactions