Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash Format Validator is invalid #51

Open
dvsoo opened this issue Dec 11, 2018 · 1 comment
Open

Dash Format Validator is invalid #51

dvsoo opened this issue Dec 11, 2018 · 1 comment

Comments

@dvsoo
Copy link

dvsoo commented Dec 11, 2018

Dash Format Validator is invalid
And I hope make PIVX Format Validator
Thank you

@ljluestc
Copy link

import re

def is_valid_pivx_address(address):
    # Regular expression pattern for a PIVX address
    pattern = r'^D[a-zA-Z0-9]{33}$'
    
    # Check if the address matches the pattern
    return re.match(pattern, address) is not None

# Test the validator
address1 = "D6fZq5sGQ5bJ5Rsz9K9u3L6p9n5YtZiPiK"
address2 = "invalid_address"

print(is_valid_pivx_address(address1))  # Should print True
print(is_valid_pivx_address(address2))  # Should print False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants