angular-docs-cn/packages
Sonu Kapoor 88a235de3a fix(forms): handle numeric values properly in the validator (#36157)
Previously, the behavior of the `minLength` and `maxLength` validators
caused confusion, as they appeared to work with numeric values but
did not in fact produce consistent results. This commit fixes the issue
by skipping validation altogether when a numeric value is used.

BREAKING CHANGES:

* The `minLength` and `maxLength` validators now verify that a value has
numeric `length` property and invoke validation only if that's the case.
Previously, falsey values without the length property (such as `0` or
`false` values) were triggering validation errors. If your code relies on
the old behavior, you can include other validators such as [min][1] or
[requiredTrue][2] to the list of validators for a particular field.

[1]: https://angular.io/api/forms/Validators#min
[2]: https://angular.io/api/forms/Validators#requiredTrue

Closes #35591

PR Close #36157
2020-05-05 11:50:00 -07:00
..
animations build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
bazel build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
benchpress release(benchpress): bump version of benchpress to 0.2.0 (#36457) 2020-04-22 17:10:28 -04:00
common refactor(common): remove WrappedValue from AsyncPipe (#36633) 2020-04-30 11:41:49 -07:00
compiler fix(compiler): normalize line endings in ICU expansions (#36741) 2020-04-28 12:22:40 -07:00
compiler-cli perf(ngcc): speed up the `getBasePaths()` computation (#36881) 2020-05-04 12:50:02 -07:00
core fix(core): log error instead of warning for unknown properties and elements (#36399) 2020-05-04 12:37:42 -07:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
examples build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
forms fix(forms): handle numeric values properly in the validator (#36157) 2020-05-05 11:50:00 -07:00
http build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
language-service test(language-service): Add method to override inline template (#36890) 2020-05-04 12:50:47 -07:00
localize feat(localize): support merging multiple translation files (#36792) 2020-05-01 09:46:12 -07:00
platform-browser fix(core): log error instead of warning for unknown properties and elements (#36399) 2020-05-04 12:37:42 -07:00
platform-browser-dynamic build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
platform-server build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
platform-webworker build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
platform-webworker-dynamic build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
private/testing build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router fix(router): cancel navigation when at least one resolver completes with no "next" emission (#24621) 2020-05-04 12:36:49 -07:00
service-worker feat(service-worker): use `ignoreVary: true` when retrieving responses from cache (#34663) 2020-05-01 09:44:07 -07:00
upgrade build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
zone.js revert: "feat(dev-infra): exposed new rule 'component_benchmark' via dev_infra (#36434)" (#36798) 2020-04-24 11:03:38 -07:00
BUILD.bazel build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js build: move circular deps golden to a subfolder (#36630) 2020-04-22 17:11:20 -04:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
goog.d.ts fix(ivy): use goog.LOCALE for Closure Compiler to define default LOCALE_ID (#31519) 2019-07-16 13:02:10 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: no longer run tslint from within gulp task (#35800) 2020-03-03 09:20:49 -08:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json revert: "feat(dev-infra): exposed new rule 'component_benchmark' via dev_infra (#36434)" (#36798) 2020-04-24 11:03:38 -07:00
types.d.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT