andrerwolff / PFT

Personal Finance Tracker
0 stars 1 forks source link

Input Validation #6

Closed andrerwolff closed 6 years ago

andrerwolff commented 6 years ago

PFT should validate all input so that the user doesn't blow something up accidentally.

*Idea: Create new module that handles all inputs. whenever user input is required, call the required function or call the function with required argument to handle that specific input case.

Something like:


from PFT import inputValidation as iv

name = iv.account_names()
def account_names()
    while True:
        name = input('enter account name:')
        if name is a valid entry:
            return name
       else:
           print('Try again')
andrerwolff commented 6 years ago

I will finish this issue when dealing with #14. Cosed for now.