Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Add ValidationMessage TagHelper. #1339

Closed

Conversation

NTaylorMullen
Copy link
Member

private IHtmlGenerator Generator { get; set; }

/// <summary>
/// An name to be validated on the current model.
Copy link
Contributor

Choose a reason for hiding this comment

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

Name to be validated on the current model.

@pranavkm
Copy link
Contributor

Design looks fine

tag: output.TagName,
htmlAttributes: null);

output.Merge(tagBuilder);
Copy link
Member

Choose a reason for hiding this comment

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

can't call this extension because it will overwrite the tag name. should copy attributes and the content explicitly. that'll avoid issues with subclasses that apply to different tags or whenever we update this to apply to multiple tag names.

@dougbu
Copy link
Member

dougbu commented Oct 13, 2014

@NTaylorMullen NTaylorMullen changed the title [Design] Add ValidationMessage TagHelper. Add ValidationMessage TagHelper. Oct 14, 2014
@NTaylorMullen NTaylorMullen force-pushed the TagHelpers_ValidationMessage branch 2 times, most recently from 0708aef to a33aa3e Compare October 14, 2014 05:37
@NTaylorMullen
Copy link
Member Author

Addressed code review comments.

/// <summary>
/// Name to be validated on the current model.
/// </summary>
[HtmlAttributeName("validation-for")]
Copy link
Member

Choose a reason for hiding this comment

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

have you checked this attribute into Razor?

Copy link
Member Author

Choose a reason for hiding this comment

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

si 😄

@dougbu
Copy link
Member

dougbu commented Oct 15, 2014

:shipit: with small comment fix if [HtmlAttributeName] is in Razor now

@NTaylorMullen
Copy link
Member Author

Will get in once previous PR's in the chain are in

- Added tests to validate ValidationMessageTagHelper functionality.

#1250
@NTaylorMullen
Copy link
Member Author

1cf6935

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

Successfully merging this pull request may close these issues.

None yet

3 participants