This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Autoplay

    Add Validation Error Labels to an Elm Form

    Enrico BuonannoEnrico Buonanno

    In this lesson, we'll simply add labels to the form that will display validation error messages.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    Instructor: 00:01 We now want to add some labels that show the validation errors to the user. We could put these next to the corresponding input and say "Label."

    00:15 We'd probably give it some custom class. For example, say "Label Label Error," so that it shows up in red or something like that.

    00:30 What will be the text for this label? We don't know yet, because we don't have this data on the model. Let me just leave this like this for the moment.

    00:44 You can see the validation appears here, but we need to populate this properly...

    Discuss

    Discuss