First pass at some client-side validation

It's slow, and I'm concerned about performance as the number
of students/restrictions grows or on devices with less
power. The validation messages are also not finished.