code: function validate({ username, password }, { i18n }) {
    const errors = {}
  
    if (!username) {
      errors.username = i18n.t`Username is required`
    } else if (validUsernames.indexOf(username)) {
      errors.username = i18n.t`Sorry ${username}, you can't get in.`
    }
  
    return errors
  }
docs: validate(values, props) -> errors