Registering validators in React

Tags: #<Tag:0x00007f8b1d68d0d0> #<Tag:0x00007f8b1d68cf90>

Hello. Following this guide I can’t seem to register a validator with Handsontable because it is undefined.

Is this actually possible to do in React? I tried

import Handsontable from 'handsontable';
Handsontable.validators.registerValidator(name, (value, callback) => {
    return callback(true); // as a test
  });

but Handsontable is undefined.

Hi @anthony.gls

It works well for me this way https://jsfiddle.net/5w0jkday/1/

Maybe you were referring to the validator before you registered it?

1 Like

Yah something strange with Webpack… sorry for this!

No worries. I’m glad to hear that the case it solved.