StrProp.startsWithOneOf(...) would be very useful #680
Labels
API Addition
enhancement
good first issue
Hacktoberfest
Anyone can take - Especially Hacktober people
help wanted
Milestone
Is your feature request related to a problem? Please describe.
When you need to specify a url, it would be nice to explicitly allow it to start with "http://" or "https://".
Its possible to do that with a regex, but its a relatively common need. Similarly, to specify a set of possible input files of select types, it would be nice to specify file endings, e.g. .png, .jpg, .gif.
Describe the solution you'd like
Add validators that are exposed as methods like this:
startsWithOneOf(String[])
startsWithOneOfIgnoringCase(String[])
endsWithOneOf(String[])
endsWithOneOfIgnoringCase(String[])
Notes for Hacktoberfest
These are some relatively simple additions to some existing classes. The new validations would be added to the StringValidator. Each type of validation is a subclass of that class and is implemented as an interclass within it.
If you are unfamiliar with the project, please look over the AndHow Site to get a basic understanding of what AndHow is, in particular, how Properties are used.
For this task:
startsWithOneOf(String[])
The text was updated successfully, but these errors were encountered: