xVal. AttachValidator(null, {"Fields":{"FieldName":"Art..." />

Validate title and user name unique combination with xVal?

XVal generates validation rules (for jQuery validation plug-in): script type="text/javascript">xVal. AttachValidator(null, {"Fields":{"FieldName":"ArticleId","FieldRules":{"RuleName":"DataType","RuleParameters":{"Type":"Integer"}}}, {"FieldName":"Title","FieldRules":{"RuleName":"Required","RuleParameters":{},"Message":"Please enter title"}, {"RuleName":"Remote","RuleParameters":{"url":"/articles/ValidateTitle"}}}, {"FieldName":"UserId","FieldRules":{"RuleName":"Required","RuleParameters":{},"Message":"Please select a user"}}}, {"ValidationSummary":{"ElementID":"validationSummary","HeaderMessage":"Please correct the errors and try again. "}}).

XVal generates validation rules (for jQuery validation plug-in): Now there is only one condition: a user should be chosen from select list. I don't know how to hide (reset) title error message when title + user1 is invalid and I chose user2 from list. And opposite: hide user error message after I chose user and edit title.

Every article is associated with an user. I'm using xVal for validation. ValidateTitle - is a controller action which validates that {userName}/{articleTitle} is unique.

It works using Ajax. Everything works fine when I'm editing title, but I have problems when I change the user in select list. If title was invalid for user1, and I choose user2, previous error message remains and I can't check that title for user2 is valid.

I can validate user name the same way I do it with title, but there will be cases when 2 errors saying that user name and title combination is invalid will be shown. Title errors and user errors should be synchronized, but how? Or maybe there is another way I should work with title and users list?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions