---
title: Validator Notification Types
product: Form Library
description: Show warning and informational validation messages in SurveyJS forms without blocking submission. View this JavaScript demo to configure validator notification types.
framework: jQuery
source: https://surveyjs.io/form-library/examples/validator-notification-types/jquery
index: https://surveyjs.io/form-library/examples/overview.md
---

# Validator Notification Types (jQuery)

Validators can display three types of notifications when validation fails: error (red), warning (orange), and informational note (blue). Errors block survey progress until resolved. Warnings indicate potential issues but don't block respondents from continuing the survey. Informational notes provide guidance without restrictions.

By default, validators display errors. To show a warning or informational note instead, set the validator's [`notificationType`](/form-library/documentation/api-reference/surveyvalidator#notificationType) property to `"warning"` or `"info"`. For the best user experience, enable immediate validation by setting the `SurveyModel`'s [`checkErrorsMode`](/form-library/documentation/api-reference/survey-data-model#checkErrorsMode) property to `"onValueChanged"`.

> If multiple notification types are eligible to be displayed for a question, only the strongest type is shown. Warnings appear only after all errors are resolved, and notes appear only when no errors or warnings remain. Try entering an invalid email in the **Email address** field, then replace it with a valid one to see the error change to an informational note.

[Documentation: Data Validation](/form-library/documentation/data-validation (linkStyle))

## Files

### `public/index.html`

```html
<link href="https://fonts.googleapis.com/css?family=Open%20Sans:400,600&display=swap" rel="stylesheet">
<div id="surveyElement" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; min-height: 100%; height:100%"></div>
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/index.js`

```js
import $ from "jquery";
import { Model } from "survey-core";
import "survey-js-ui";
import "survey-core/survey-core.min.css";
import "./index.css";
import { json } from "./json";

const survey = new Model(json);
survey.onComplete.add((sender, options) => {
    console.log(JSON.stringify(sender.data, null, 3));
});
survey.data = {
  triedWorkaround: "No",
  priority: "Critical",
  details: "Short description",
  email: "jane@example.com"
};

survey.validate();


$("#surveyElement").Survey({ model: survey });
```

### `src/json.js`

```js
export const json = {
  "title": "Support Request",
  "checkErrorsMode": "onValueChanged",
  "completeText": "Submit Request",
  "elements": [{
    "type": "text",
    "name": "fullName",
    "title": "Full name",
    "isRequired": true
  }, {
    "type": "radiogroup",
    "name": "triedWorkaround",
    "title": "Have you already tried the suggested troubleshooting steps?",
    "isRequired": true,
    "choices": [
      "Yes",
      "No"
    ],
    "validators": [{
      "type": "expression",
      "expression": "{triedWorkaround} <> 'No'",
      "text": "Please try the troubleshooting steps first. You can still submit this request if they did not help.",
      "notificationType": "warning"
    }]
  }, {
    "type": "dropdown",
    "name": "priority",
    "title": "Request priority",
    "isRequired": true,
    "choices": [
      "Low",
      "Normal",
      "High",
      "Critical"
    ],
    "validators": [{
      "type": "expression",
      "expression": "{priority} <> 'Critical'",
      "text": "Critical is reserved for outages and data loss. Your request can still be submitted.",
      "notificationType": "warning"
    }]
  }, {
    "type": "comment",
    "name": "details",
    "title": "Describe the issue",
    "isRequired": true,
    "textUpdateMode": "onTyping",
    "placeholder": "What happened, and what did you already try?",
    "validators": [{
      "type": "text",
      "minLength": 20,
      "text": "Your description is very short. Consider adding more details so we can process the request faster.",
      "notificationType": "warning"
    }]
  }, {
    "type": "text",
    "name": "email",
    "title": "Email address",
    "inputType": "email",
    "isRequired": true,
    "placeholder": "name@example.com",
    "validators": [{
      "type": "email",
      "text": "Please enter a valid email address."
    }, {
      "type": "expression",
      "expression": "{email} empty",
      "text": "We'll send status updates to this email.",
      "notificationType": "info"
    }]
  }]
}
;
```

### `src/theme.js`

```js
export const themeJson = {};
```

### `package.json`

```json
{
  "dependencies": {
    "jquery": "latest",
    "survey-core": "latest",
    "survey-js-ui": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/form-library/examples/validator-notification-types/angular.md)
- [React](https://surveyjs.io/form-library/examples/validator-notification-types/reactjs.md)
- [Vue 3](https://surveyjs.io/form-library/examples/validator-notification-types/vue3js.md)
- [Vanilla JS](https://surveyjs.io/form-library/examples/validator-notification-types/vanillajs.md)
