Drop Down in the Data Table Required is not working

Hi,

I have a Data Table where the Drop Down Required is On but I can still submit even if its blank. Pls. help.
Is there a workaround whereby I can control via code?

Hello @Bert,

Yes, we will improve the validation for the Data Table control column in future releases.

For now, you can add custom validation to make sure that users entered data to the column:

fd.control('DataTable1').addValidator({
    name: 'DataTable validator',
    error: "Fill out all required columns",
    validate: function(value) {
        for (var i = 0; i < value.length; i++) {
            if (!value[i].Column2) {
                return false;
            }
        }
        return true;
    }
})

Hi @mnikitina,

Thank you. It works perfectly!

1 Like