Bakaburg
Bakaburg

Reputation: 3321

Validate advanced post types in pods framework on save in backend

Which is the most correct way to validate inputs on new pod save from wordpress backend if the pod is an advanced post type with is own table?

I also want to return an error message if the inputs are not fixable.

Thanks!

Upvotes: 1

Views: 597

Answers (1)

Thiago Macedo
Thiago Macedo

Reputation: 6311

Probably the pre_save filter is our best bet. http://pods.io/docs/code/filter-reference/pods_api_pre_save_pod_item/

Not sure yet how to return an error, but the pods_error method should handle the bits of the different circumstances.

Upvotes: 1

Related Questions