Revision 60274
Added by Konstantinos Triantafyllou over 3 years ago
string-utils.class.ts | ||
---|---|---|
1 | 1 |
import {UrlSegment} from '@angular/router'; |
2 |
import {ValidatorFn, Validators} from "@angular/forms"; |
|
2 |
import {AbstractControl, ValidatorFn, Validators} from "@angular/forms";
|
|
3 | 3 |
|
4 | 4 |
export class Dates { |
5 | 5 |
public static yearMin = 1800; |
... | ... | |
214 | 214 |
return decodeURIComponent(params); |
215 | 215 |
} |
216 | 216 |
|
217 |
public static validateEmails(emails: string): boolean { |
|
218 |
return (emails.split(',') |
|
219 |
.map(email => Validators.email(<AbstractControl>{ value: email.trim() })) |
|
220 |
.find(_ => _ !== null) === undefined); |
|
221 |
} |
|
222 |
|
|
217 | 223 |
public static b64DecodeUnicode(str) { |
218 | 224 |
return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) { |
219 | 225 |
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); |
Also available in: Unified diff
[Library | Trunk]: Create subscriber invite and subscribers components.