Skip Navigation

[Resolved] Image field validation

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.39 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 7 years, 3 months ago.

Assisted by: Beda.

Author
Posts
#558808

Is it possible to make the image validation also allow absolute relative paths (/uploads/to-image-here.png) as well as protocol agnostic paths (//url-here.com/path-to-image.png)? The requirement for the full absolute path is very time consuming for those who need to rely on relative paths. THanks

TD

#558869

I am not sure to understand.

Can you give me a code sample you are using with the CRED cred_form_validate filter?

I also need some steps to follow, to see the issue.

For your reference:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_ajax_upload_validate

#559038

Hi, this is not with CRED, but with Types. Just create post fields with an image field, add an image using /path/to/image.png or based on my original thread and you will see the validation. it is very time consuming and annoying.

#559127

I understand.

Attachements need to be saved with a Full path.
This is actually the same in WordPress Media.

I apologise that this is not possible.

But it should also not be an issue, as you anyway upload the Media (or insert it) with a GUI, where you do not need to edit any URL.