Views seems to be using one of these other non-public validate functions already:

views/plugins/views_wizard/views_ui_base_views_wizard.class.php:140:      '#element_validate' => array('_element_validate_integer_positive'),
views/plugins/views_wizard/views_ui_base_views_wizard.class.php:266:      '#element_validate' => array('_element_validate_integer_positive'),

Given that these may be altered (per #589440: Reordering fails with more than 31 book pages in a book) probably better to re-implement in Views for safety

CommentFileSizeAuthor
#1 1178128-own-validate.patch2.05 KBdawehner

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new2.05 KB

Here is a patch for it. I hope the documentation makes sense.

dawehner’s picture

Status: Needs review » Fixed

Commited to 7.x-3.x

pwolanin’s picture

per the other issue, should you make it accept 0 as valid?

pwolanin’s picture

Title: Views is unsing a "non-public" validation function from fields module » Views is using a "non-public" validation function from fields module
dawehner’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.