Changed example to validate only on submit