title: Validate command not working in Tkinter
body: <p>In this program, I am attempting to check if an input matches a certain word (in this case 'APPLE') however the vcmd doesn't seem to be recognised - any ideas?</p>
  
  <pre><code>from tkinter import *
  
  class Window(Frame):
      def __init__(self, parent):
          Frame.__init__(self, parent)
  
          self.vmcd1 = parent.register(self.validate_entry)
  
          self.title = Label(self, text='Enter here:')
          self.title.pack()
  
          self.entry = Entry(self, validatecommand=(self.vcmd1,'%P'))
          self.entry.pack()
  
  
          self.entered=Label(self, text='You entered')
          self.entered.pack()
  
      def callback(self):
          self.entered.config(text='You entered: ' + self.entry.get())
  
      def validate_entry(self, entry):
          print('Code validates entry')
          if entry == 'APPLE':
              print('This input is correct.')
          else:
              pass
  
  
  root = Tk()
  frame = Window(root)
  frame.pack()
  root.mainloop()
  </code></pre>