Skip to content
Sébastiaan edited this page Mar 5, 2020 · 8 revisions
  1. Hint 1
  2. Hint 2
  3. Hint 3
  4. Hint 4 (you're here)
  5. Hint 5
  6. Hint 6
  7. Hint 7

Hint 4: Limiting the possible values

This hint is about the fourth bullet in the analysis:

  • It's about users.
  • We need to add a field to the profile.
  • It's a field for the shoe size.
  • The field should only accept values from 39 until 47.
  • It can be empty.
  • It should be editable on the admin member edit page.
  • It should be visible on the public user profiles.

The field should only accept values from 39 until 47. What this means is that we should validate that the entered integer is in the inclusive range 39-47.

To implement validation for the shoe_size field we can use validators. Take a look at the documentation, you should be able to find a way to limit the value to a maximum and a minimum.

You can find a spoiler here.

Clone this wiki locally