do you have the forms action set to post to another page?
The validated entries bindings only exist on the forms action page.
to get the correct code to use, you can go to the forms action page and expand the validated entries bindings there to copy to the form page.