Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson

Already subscribed? Sign In


    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.



    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


    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...