/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/forms/src/directives/ng_no_validate_directive.ts
35 строк
831 B
hawkgs
docs: set syntax highlighting of code examples MD code blocks (#59026)
04 дек 2024, 19:30
04 дек 2024, 19:30
0513fbc
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive} from '@angular/core'; /** * @description * * Adds `novalidate` attribute to all forms by default. * * `novalidate` is used to disable browser's native form validation. * * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute: * * ```html * <form ngNativeValidate></form> * ``` * * @publicApi * @ngModule ReactiveFormsModule * @ngModule FormsModule */ @Directive({ selector: 'form:not([ngNoForm]):not([ngNativeValidate])', host: {'novalidate': ''}, standalone: false, }) export class ɵNgNoValidate {} export {ɵNgNoValidate as NgNoValidate};