Support » Plugin: CMB2 » Validate values onbackend.

  • Resolved samchief

    (@samchief)


    Good day,
    How can I validate numeric values being inputed into a field on the backend
    not to be above a certain number say, 30, then echo an error message
    when the validation fails.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’d recommend trying out an admin notice, for a low end quick to implement option. Check the condition, and if not met, tell WP to queue up the admin notice via add_action. Not sure offhand on how to prevent the rest of the processing, if that’s also part of what you have in mind.

    Thread Starter samchief

    (@samchief)

    Great idea on the admin notice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Validate values onbackend.’ is closed to new replies.