Title: ACF Validated Field PHP Syntax Error
Last modified: October 26, 2016

---

# ACF Validated Field PHP Syntax Error

 *  Resolved [vehn67](https://wordpress.org/support/users/vehn67/)
 * (@vehn67)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/acf-validated-field-php-syntax-error/)
 * I am having a weird PHP syntax error when I try to use the Validated Field for
   ACF plugin. I tried a simple return PHP code but still it has a syntax error 
   and I am having a difficult time finding the error line in the PHP code because
   I have no idea where to search. It would be nice if you guys have some idea about
   this.
 * Please check links of the images:
    [https://postimg.org/image/plskfslt9/e4680500/](https://postimg.org/image/plskfslt9/e4680500/)⌊
   PHP Syntax Error⌉
 * [https://postimg.org/image/cxm67wcvv/c0db1ddd/](https://postimg.org/image/cxm67wcvv/c0db1ddd/)
   ⌊
   PHP Code Hello⌉
    -  This topic was modified 9 years, 7 months ago by [vehn67](https://wordpress.org/support/users/vehn67/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [doublesharp](https://wordpress.org/support/users/doublesharp/)
 * (@doublesharp)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/acf-validated-field-php-syntax-error/#post-8393712)
 * Hi [@vehn67](https://wordpress.org/support/users/vehn67/) – I can only load the
   first image you posted which is indicating an error with a percent sign, so my
   guess is that maybe you have included PHP tags? The validation code is `eval`‘
   d so you should just include the code, not the PHP tags.
 * Let me know if you were able to get it working and I will close this ticket, 
   otherwise if you could include an example of your validation function I can try
   to debug further.
 * Thanks!
 *  Thread Starter [vehn67](https://wordpress.org/support/users/vehn67/)
 * (@vehn67)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/acf-validated-field-php-syntax-error/#post-8394123)
 * Hi [@doublesharp](https://wordpress.org/support/users/doublesharp/) – Thank you
   very much for the reply. I think you are correct about the PHP tags but as I 
   checked the validation codes, there were no PHP tags included and other pages
   were okay except for this one page. I think there is something in this page that
   adds PHP tags that I don’t know where or why. But please close this ticket as
   I think the problem is not on ACF Validation plugin. I really appreciate the 
   help. Thanks again.
    -  This reply was modified 9 years, 6 months ago by [vehn67](https://wordpress.org/support/users/vehn67/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ACF Validated Field PHP Syntax Error’ is closed to new replies.

 * ![](https://ps.w.org/validated-field-for-acf/assets/icon-256x256.png?rev=1116693)
 * [Advanced Custom Fields: Validated Field](https://wordpress.org/plugins/validated-field-for-acf/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/validated-field-for-acf/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/validated-field-for-acf/)
 * [Active Topics](https://wordpress.org/support/plugin/validated-field-for-acf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/validated-field-for-acf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/validated-field-for-acf/reviews/)

## Tags

 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 2 replies
 * 2 participants
 * Last reply from: [vehn67](https://wordpress.org/support/users/vehn67/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/acf-validated-field-php-syntax-error/#post-8394123)
 * Status: resolved