Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iagirre heading population restriction validation #2115

Conversation

iagirre
Copy link

@iagirre iagirre commented Oct 31, 2017

Where

What

Add validations to avoid the admins to insert a value of 0 in the population field. Only nil or > 0 are valid.

How

  • I added a validator in the headings model to check the two conditions.
  • I added a validator in the form that avoids the user to post the form if population value is less than 1.
  • I added an explanation test for that field when the focus is on the field.

Screenshots

population01
population02

Test

I added tests to check the validations in the model.

Deployment

Nothing to apply.

Warnings

Nothing to apply.

iagirre added 2 commits October 31, 2017 13:04
…on population field an explanation appears. Some specs added to test the model validations
@bertocq bertocq added this to the v0.11 milestone Nov 21, 2017
Copy link
Contributor

@MariaCheca MariaCheca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MariaCheca MariaCheca merged commit 3984d6a into consuldemocracy:master Nov 28, 2017
@iagirre iagirre deleted the iagirre-heading-population-restriction-validation branch January 16, 2018 07:23
clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
…ing-population-restriction-validation

Iagirre heading population restriction validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants