mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-21 12:29:03 +01:00
set payzen public key as invalid if the field is empty
This commit is contained in:
parent
c6bc9f1c15
commit
dd1d05cc3a
@ -74,9 +74,7 @@ const PayZenKeysFormComponent: React.FC<PayZenKeysFormProps> = ({ onValidKeys, o
|
||||
* Depending on the test result, assign an add-on icon plus a style to notify the user.
|
||||
*/
|
||||
const testPublicKey = (key: string) => {
|
||||
if (!key) return;
|
||||
|
||||
if (!key.match(/^[0-9]+:/)) {
|
||||
if (!key || !key.match(/^[0-9]+:/)) {
|
||||
setPublicKeyAddOn(<i className="fa fa-times" />);
|
||||
setPublicKeyAddOnClassName('key-invalid');
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user