Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / src / validators / isValidAddress.ts
Size: Mime:
import { isEmpty, isString } from 'exotic'

const matchValidAddressCharacters = /^[A-Za-z0-9,.-:;#/'°\s]*$/

function isEmptyOrValidAddress(value: string): boolean {
  if (isEmpty(value)) {
    return true
  } else {
    return isString(value) && matchValidAddressCharacters.test(value)
  }
}

export { isEmptyOrValidAddress }