Skip to content

Commit

Permalink
Feature/referral data (#118)
Browse files Browse the repository at this point in the history
* referral data and v5 contracts update

* referral data for main

* fix address validator
  • Loading branch information
Sorizen authored Nov 6, 2024
1 parent f440bf7 commit 990b342
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const maxValue = (value: number): ValidationRule =>

export const required = <ValidationRule>withI18nMessage(_required)

export const address = <ValidationRule>withI18nMessage(isAddress)
export const address = <ValidationRule>(
withI18nMessage(value => !value || isAddress(value))
)

export const ether = <ValidationRule>withI18nMessage(value => {
try {
Expand Down

0 comments on commit 990b342

Please sign in to comment.