Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82800

Can we have an action (create, edit ...) in field validation ?

$
0
0

Hello,

I would like to know if it's possible to have a validator only on specific action at field level :
Here, there is never 'test' in my log, what is wrong ?
But with Global validator, it works fine.

        // Fields Validator
        ->fields(
            Field::inst( 'USERID' )
                ->validator(function ($editor, $action, $data){
                    if ($action === Editor::ACTION_EDIT){
                        error_log('test');
                    }
                    return true;
                })

Viewing all articles
Browse latest Browse all 82800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>