Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved routing info on regex constraints, plus more #2450

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

Eilon
Copy link
Member

@Eilon Eilon commented Dec 29, 2016

Also fixed some broken/inaccurate links, typos, etc.

cc @Rick-Anderson @rynowak @danroth27

Also fixed some broken/inaccurate links, typos, etc.
@dnfclas
Copy link

dnfclas commented Dec 29, 2016

Hi @Eilon, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

| `alpha` | {name:alpha} | Rick | String must consist of alphabetical characters |
| `regex(expression)` | {ssn:regex(^d{3}-d{2}-d{4}$)} | 123-45-6789 | String must match the regular expression |
| `required` | {name:required} | Rick | Used to enforce that a non-parameter value is present during URL generation |
| `int` | `{id:int}` | `123456789`, `-123456789` | Matches any integer |
Copy link
Member Author

Choose a reason for hiding this comment

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

I added more esoteric examples here to give much more info on what kind of values could be parsed (e.g. whether thousands separators, exponents, negative values, case-sensitivity, etc. were supported). There were also a few missing built-in constraints, such as length(length).

@Rick-Anderson Rick-Anderson merged commit 3a0f4e6 into master Jan 3, 2017
@Rick-Anderson Rick-Anderson deleted the eilon/routing-greatness branch January 3, 2017 20:27
@Rick-Anderson
Copy link
Contributor

@Eilon thanks for the fantastic updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants