School fields requiring validation

Issue #105 closed
Ghislain Hachey created an issue

required validation - schNo, schName, schType, schAuth , iCode ?

Comments (8)

  1. Brian Lewis repo owner

    this may end up forcing a bit of refactoring in EditController.ts I think, because save() doesn't actually go via modelForm.submit ....

  2. Ghislain Hachey reporter

    Do you have any objection while I am at it to add some basic validation stuff in there? This project seems pretty good at first glance

  3. Ghislain Hachey reporter

    On second look angular-validate only offer URL and email as out-of-the-box extra over angular built-in. It was looking for the easiest quickest way to put some basic validation stuff in there.

  4. Brian Lewis repo owner

    I have looked at angular-validate and thought it would be good to include at some point. I like the schema extension too - Conceptually I've always thought there's a bit of conflict in having validations built into the view, when these are really "business rules" that ought to be defined in the "model". The schema approach offers a way that the "model" can own the business rules, and communicate them to any view as required.

    ng-messages is another piece of the validation eco-system well worth considering.

    Maybe we do this in Honiara? ( start making a list!)

  5. Ghislain Hachey reporter

    Yeah. For now I got it working nicely. I'll be submit PR soon. Just basic for now. We can improve but other priorities. And yes, what you say makes sense. So maybe we create another issue for this and may get to it while in Honiara or soon afterwards.

  6. Ghislain Hachey reporter

    feat(SchoolItem.cshtml): basic support for validation

    Includes:

    • basic validation on school form
    • validation styling
    • support for required on lookups-selector
    • enhanced UI behaviors
    • fix schClosed loosing value

    Closes #105, #109, #103

    → <<cset c87c24adc563>>

  7. Brian Lewis repo owner

    feat(SchoolItem.cshtml): basic support for validation

    Includes:

    • basic validation on school form
    • validation styling
    • support for required on lookups-selector
    • enhanced UI behaviors
    • fix schClosed loosing value

    Closes #105, #109, #103

    → <<cset c87c24adc563>>

  8. Log in to comment