Skip to content

NAF

NAF

is_naf_format_correct

is_naf_format_correct(naf)

Validate that NAF has NAF format

Source code in source/src/NAF.py
def is_naf_format_correct(naf):
    """Validate that NAF has NAF format"""
    try:
        NAF(naf)  # Parse using constructor
    except ValueError:
        return False
    return True

clean_naf

clean_naf(naf)

Removes symbols that are not numbers in a SS number

Source code in source/src/NAF.py
def clean_naf(naf):
    "Removes symbols that are not numbers in a SS number"
    return naf.replace("/", "").replace("-", "")