How to prevent error messages under field?

How to prevent error messages under field?

pisislerpisisler Posts: 48Questions: 13Answers: 1
edited April 30 in Free community support

Hi.

I am trying to use a modal box for showing validation errors, which I can, by using a callback in onFieldError option. But of course the error message is displayed under the field too. Is there a way to suppress the field error being shown under the field? I tried something like below but it didn't work.

$.fn.dataTable.ext.errMode = 'none';
$('#table').on('error.dt', function (e, settings, techNote, message) {
    alert(message);
});

Guess we can call this a custom error handling method. There were discussions about this but I couldn't manage to make a viable solution.

Answers

  • colincolin Posts: 11,475Questions: 0Answers: 1,961

    Is this using Editor? You would need to clear the errors manually with field().error().

    Out of curiosity, could you let me know if this is the account you purchased Editor with - as it appears you had a trial that expired last year.

    Colin

  • pisislerpisisler Posts: 48Questions: 13Answers: 1

    Thank you colin. I will try clearing the errors but the problem is, on('error.dt) doesn't seem to be triggered on field errors.

    By the way, I haven't yet purchased it; because last year I abandoned the project I had in mind. Now I am taking a look at Editor 2.0.1 and if I can turn it into a project, I will buy a license in a couple of days.

  • colincolin Posts: 11,475Questions: 0Answers: 1,961

    Excellent. on('error.dt') is only for errors when loading the DataTable, not for field errors with Editor. For Editor, you could use submitError,

    Colin

Sign In or Register to comment.