Enable submit button if entire data is valid and acceptable

Tags: #<Tag:0x00007efc705b6418>

Hi,
I am new to handsontable in an Angular APP and we are testing it for one of our product our requirement is to allow user to import data from excel files and send it to server but before sending it to server we need to run some validation on each column i am doing it via validator and it and we show which column is having invalid data.

in order to submit data i have a button which get instance data and submits the data but What i want is to enable submit button ONLY when all data in table is valid and no column has invalid value. how is it possible to do such thing ?

Hi @talhach891 we’ll look into your issue and get back to you soon.

1 Like

Hi @talhach891 sorry for keep you waiting.

The solution you are looking for seems to be pretty straightforward. All you need to do is to check if the value inside the cell is valid using afterValidate method to get its current state.

Here is the example that shows the solution: https://jsfiddle.net/rLne4c38/2/

Please, let me know if that solution works for you.