• I want to add several custom fields to my posts. I want them to be mandatory. Also I want to be able to validate each field.

    Example: Each post should have a version number and a URL poiting to a zip file. I want to verify that the version number doesn’t have any space. Only digits and dots are allowed. The URL should start with “http://” and end with “.zip”

    If any value is incorrect the post should not be saved.

    Is there a plugin that can handle mandatory and validated custom fields? I’ve only found the Custom Field GUI which doesn’t solve my problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • No idea if this will do it, but HeadSpace 2 from Urban Giraffe is highly thought of

    Thread Starter niska

    (@niska)

    HeadSpace2 found at http://urbangiraffe.com/plugins/headspace2/ did not solve my problem.

    I need a very simple plugin that validates custom fields. I would like to be able to configure using key – value. Like this:
    ‘url’ => ‘/^http:\/\/.+/’
    ‘image’ => ‘/.+\.(png|jpg|gif)$/i’

    If the user adds a custom field with the name ‘url’, then a check against the regular expression is made to see if it’s valid.

    I also need a simple plugin that is configured using a list of mandatory custom fields. Like ‘url’ and ‘image’.

    Any ideas of how to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mandatory and validated custom fields’ is closed to new replies.