email validator: add options to reject upload based on email patterns

Similarly to allowing upload only when the committer and author email
matches given patterns, introduce rejecting upload based on patterns.

This effectively adds the options `rejectedAuthorEmailPattern` and
`rejectedCommitterEmailPattern` and basically copies the implementation
inverting the logic.

There could be made a bigger effort to deduplicate the code, yet there
is very little churn on the code base itself and a high risk to break
existing users by refactoring the code in the absence of more detailed

The documentation has been updated accordingly and slightly modified for
clarity and brevity.

Bug: 259663353
Change-Id: Ifaee5073df1e67cb9fd04da10e391b596b80998e
Signed-off-by: Matthias Maennich <>
3 files changed