• Resolved Space

    (@bkno)


    Hi,

    Fantastic plugin! Please can you explain what the difference is between:

    Unique for Post Type
    Unique for Post Type + Field/Meta key

    I have a field which is basically an equivalent of the WP slug which has to be unique for the post type, but not sure which to choose. Sorry if I missed this documented somewhere.

    Cheers.

    https://wordpress.org/plugins/validated-field-for-acf/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author doublesharp

    (@doublesharp)

    Hi @bkno – Post Type would ensure that the value is unique regardless of which meta_key it is stored under (maybe some kind of GUID?), whereas Post Type + Field/Meta Key will apply the uniqueness to a particular field (useful for things like phone numbers). If you use the latter, you could have the same value stored under different meta keys, but set to be unique for each meta key.

    The third option you didn’t mention is Post + Field/Meta key which behaves like the other that includes the meta_key, but instead of making it unique for the post type it applies the uniqueness per post. This is useful for some field types where you are allowed to select multiple values.

    Hope that helps!

    Thread Starter Space

    (@bkno)

    Thanks for explaining – I understand now. Great that there’s such flexibility.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clarification on unique value’ is closed to new replies.