Validate user input using seperate function : <p>How do I get this to not return 'brea outside loop'. I've read multiple other answers on stackoverflow but cannot grasp the concept as it's inside a seperate function.</p>

<pre><code>  def dayEntry(book,cmd):

          for x,type in zip(list, gettype):

                entry = input('?: ')
                validate(entry,type)
                results.append(entry)

        print (results)

def validate(inval, intyp):
    if intyp == "date":
        try:
            datetime.datetime.strptime(inval, '%d-%m-%Y')
        except ValueError:
            print("Format not valid, use DD-MM-YYYY")
            break
</code></pre>
