|
Posted
over 11 years
ago
by
JaCraig
There is indeed a bug. Apparently the default behavior for Validator.TryValidate (which is what the extension method wraps) is to only validate Required properties... Why the hell you would make that the default, I don't know. Anyway, I'm pushing up a fix now and adding your above code to the unit tests (along with a couple other checks).
|
|
Posted
over 11 years
ago
by
JaCraig
There is indeed a bug. Apparently the default behavior for Validator.TryValidate (which is what the extension method wraps) is to only validate Required properties... Why the hell you would make that the default, I don't know. Anyway, I'm pushing up a fix now and adding your above code to the unit tests (along with a couple other checks).
|
|
Posted
over 11 years
ago
by
sharethl
Found a problem on Data validation, Not sure is it my code problem?
the result is Suppose to be false, but it is true here.
Seems [Required] works, but [Range] not working.
[TestClass]
public class ValidationTest {
class Dog{
|
|
Posted
over 11 years
ago
by
sharethl
Found a problem on Data validation, Not sure is it my code problem?
the result is Suppose to be false, but it is true here.
Seems [Required] works, but [Range] not working.
[TestClass]
public class ValidationTest {
class Dog{
|
|
Posted
over 11 years
ago
by
sharethl
JaCraig wrote:
Finally had a chance to think about the issue. Basically the remove extension method, since it is at the IEnumerable level, can't directly remove from the list and leave it in place. So it probably makes more sense to rename the
|
|
Posted
over 11 years
ago
by
sharethl
JaCraig wrote:
Finally had a chance to think about the issue. Basically the remove extension method, since it is at the IEnumerable<T> level, can't directly remove from the list and leave it in place. So it probably makes more sense to rename
|
|
Posted
over 11 years
ago
by
JaCraig
Finally had a chance to think about the issue. Basically the remove extension method, since it is at the IEnumerable level, can't directly remove from the list and leave it in place. So it probably makes more sense to rename the Remove extension to
|
|
Posted
over 11 years
ago
by
JaCraig
Finally had a chance to think about the issue. Basically the remove extension method, since it is at the IEnumerable<T> level, can't directly remove from the list and leave it in place. So it probably makes more sense to rename the Remove
|
|
Posted
over 11 years
ago
by
JaCraig
The remove function is a generic extension method on IEnumerable<T>. No way to really do what you are suggesting on that level.
|
|
Posted
over 11 years
ago
by
JaCraig
The remove function is a generic extension method on IEnumerable. No way to really do what you are suggesting on that level.
|