Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(forms): switch to RegExp in pattern validator#62671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kirjs wants to merge1 commit intoangular:prototype/signal-forms
base:prototype/signal-forms
Choose a base branch
Loading
fromkirjs:fix/forms-pattern-validator

Conversation

kirjs
Copy link
Contributor

No description provided.

michael-small and artaommahe reacted with heart emoji
No other libraries use string patterns for validation
@angular-robotangular-robotbot added detected: featurePR contains a feature commit area: forms labelsJul 16, 2025
@ngbotngbotbot added this to theBacklog milestoneJul 16, 2025

metadata(path, PATTERN, (ctx) => {
const result = reactivePatternValue(ctx);
if (result === undefined) {
return [];
}
return [result];
return [result.source];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

shouldn't we switch thePATTERN metadata to be an array ofRegExp?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

How is thePATTERN metadata intended to be used?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It is just to give the user some way to get the list of patterns that are being applied to the field. They could use it to set the pattern attribute if they want, or to show a "hint" message under the input like "your username must be formatted like: ...".

Most users probably don't care too much about it, but for things likerequired andmin, the metadata is very important because it can be used to show the required* or set themin attribute on the input. For consistency we give you the pattern as metadata too

leonsenft reacted with thumbs up emojimichael-small reacted with rocket emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@leonsenftleonsenftleonsenft left review comments

@mmalerbammalerbammalerba left review comments

Assignees
No one assigned
Labels
area: formsdetected: featurePR contains a feature commit
Projects
None yet
Milestone
Backlog
Development

Successfully merging this pull request may close these issues.

4 participants
@kirjs@leonsenft@mmalerba@NothingEverHappens

[8]ページ先頭

©2009-2025 Movatter.jp