Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Customizing the Registration Form

Validation Should Use trim()

In step 2 of the example -- the validation -- wouldn't you want to trim() the _POST data?

In other words, in this example, if someone put a space in the first_name field in the form, it would slip through the validation and not produce an error -- wouldn't that be the case?


You're right, I've updated the example. -Jdgrimes 12:59, 16 September 2014 (UTC)