Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12679 non whitespace validator #13167

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -743,4 +743,4 @@ task jacocoReport(type: JacocoReport) {
fileTree(dir: it, exclude: ["**/*.jar"])
})
}
}
}
1 change: 1 addition & 0 deletions random.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello siri
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { ReCaptcha2Component } from 'ngx-captcha';
import { finalize } from 'rxjs/operators';
import { environment } from '../../../environments/environment';
Expand Down Expand Up @@ -41,9 +41,21 @@
});
}

/**
* Custom validator to disallow whitespace-only values.
*/
noWhitespaceValidator(control: AbstractControl): { [key: string]: boolean } | null {
if (control.value && control.value.trim().length === 0) {
return { 'whitespace': true };

Check failure on line 49 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unnecessarily quoted property 'whitespace' found

Check failure on line 49 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unnecessarily quoted property 'whitespace' found
}
return null;
}

/**
* Sends the feedback session links to the recovery email address.
*/


Check failure on line 58 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 58 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

More than 1 blank line not allowed

Check failure on line 58 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Trailing spaces not allowed

Check failure on line 58 in src/web/app/pages-help/session-links-recovery/session-links-recovery-page.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

More than 1 blank line not allowed
onSubmitFormSessionLinksRecovery(sessionLinksRecoveryForm: UntypedFormGroup): void {
if (!this.captchaSiteKey) {
this.captchaResponse = '';
Expand Down
Loading