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

Start end collection validation #164

Merged
merged 3 commits into from
Jan 15, 2020
Merged

Conversation

nicksellen
Copy link
Contributor

@nicksellen nicksellen commented Jan 9, 2020

This validates StartEndCollection usages, with two approaches:

  1. making it so you can't select invalid values in the first place
  2. regular vuelidate validations that will show an error after you first submit

From #116 :

  • end date > start date - restricted so that it cannot happen (in theory)
  • no stupidly long events (3 days?) - Q for @edwh : this doesn't seem very long to me, what about a week long festival? do they never get added?
  • no overlapping dates - can probably steal use this code, but I think this is a good time to introduce testing for edge cases
  • only one blank slot - not really validation, should probably just disable the "Add another date" button if there is already a blank slot
  • start times at 9am - not really validation, just a default
  • both start and end date are provided - I assume this is needed @edwh ?

@project-bot project-bot bot added this to Triage in FD Nuxt Client Jan 9, 2020
@edwh edwh mentioned this pull request Jan 9, 2020
8 tasks
@edwh
Copy link
Member

edwh commented Jan 9, 2020 via email

@nicksellen
Copy link
Contributor Author

We don't get week-long things, I don't think. If we do we'll change it.

We won't get any if we prevent the creation of them :p

Not sure what you're proposing to do in the overlapping case, then?

Add testing framework. Would propose jest. For this purpose, just testing a pure function, not all the UI stuff.

@edwh
Copy link
Member

edwh commented Jan 9, 2020

We won't get any if we prevent the creation of them :p

We'll get someone asking why not, though, and we've had experience of having quite a lot of events which were accidentally made longer than they actually were. So stick with this please.

Add testing framework. Would propose jest. For this purpose, just testing a pure function, not all the UI stuff.

Yes, this kind of stuff is crying out for some test cases. Go ahead.

@nicksellen nicksellen marked this pull request as ready for review January 13, 2020 10:05
@edwh edwh merged commit c0701af into master Jan 15, 2020
@edwh edwh moved this from Triage to DevReady - Low in FD Nuxt Client Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
FD Nuxt Client
  
DevReady - Low
Development

Successfully merging this pull request may close these issues.

None yet

2 participants