Provide the default form form for validating options
Overrides AccessPluginBase::validateOptionsForm
public function validateOptionsForm(&$form, &$form_state) {
if (!array_filter($form_state['values']['access_options']['role'])) {
form_error($form['role'], t('You must select at least one role if type is "by role"'));
}
}