added some validation to splash

This commit is contained in:
Ben Wilson
2023-06-26 18:19:38 -04:00
parent b3302fb84c
commit 53164ac40d
6 changed files with 1304 additions and 10746 deletions
@@ -0,0 +1,13 @@
import { AbstractControl, ValidatorFn } from '@angular/forms';
import { validate } from 'bitcoin-address-validation';
export function bitcoinAddressValidator(): ValidatorFn {
return (control: AbstractControl): { [key: string]: any } | null => {
if (validate(control.value)) {
return null;
}
return { ['bitcoin-address']: true };
};
}