Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
concrexit
concrexit
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 56
    • Issues 56
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • thalia
  • concrexitconcrexit
  • Wiki
    • Getting started
    • Your first contribution
  • Hint 4

Hint 4

Last edited by Sébastiaan Dec 09, 2017
Page history

Click here to go back to the issue

  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 repository
  • 2016 12 09 postmortem e maillijsten
  • getting-started
    • Your first contribution
  • getting-started/Your-first-contribution
    • Hint 1
    • Hint 2
    • Hint 3
    • Hint 4
    • Hint 5
    • Hint 6
    • Hint 7
  • getting-started/Your-first-contribution/Hint-1
    • spoiler
  • getting-started/Your-first-contribution/Hint-2
    • spoiler
  • getting-started/Your-first-contribution/Hint-3
    • spoiler
  • getting-started/Your-first-contribution/Hint-4
    • spoiler
  • getting-started/Your-first-contribution/Hint-5
    • spoiler
  • getting-started/Your-first-contribution/Hint-6
    • spoiler
More Pages