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
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Limit or Control What gets Input into a redux-form Field using normalizing


    Sometimes we need to add a limitation to what the user is inputting into a redux-form Field. For example, in a license plate lookup, we want all the letters to be uppercase regardless of whether the user types them in caps, or when taking a user’s name, we may want the format to be capitalized.



    Become a Member to view code

    You must be a Pro 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
    orLog In




    Instructor: Using Redux Form, we can use normalization to format the user's input. For example, we could ensure that the user's first name and surname are capitalized, regardless of how they type the values into the fields.

    The demonstrate this, let's go ahead and add capitalize as a dependency. We can import that in our register form. Now, we can use the normalize prop, and pass in the capitalize function. Let's apply this to the first name and the surname. Of course, you could pass whichever function you wanted in here.

    Let's save and refresh now. Now, even if I type everything lowercase, the values are capitalized.