Specification pattern questions

I’m implementing the Specification pattern in a few areas of my app, but I find the usages to be opposites of each other.

In one case, I use them to test for validation errors:

if (new IsNullOrEmpty().IsSatisfiedBy(entity.Title))
yield return new ValidationError(“Title”, Locale.title_is_invalid);

but for another such test:

if (new ConformsToRegex(“title_regex”).Not().IsSatisfiedBy(entity.Title))

This doesn’t really seem like a specification to me, but rather a constraint check.

Another case would be when I check user rights:

if (new UserCanEditPost(post).IsSatisfiedBy(user))

What I am wondering is this…

Is there a better way to name these objects? They seem to have a hodge-podge of names at the moment and are a little confusing to understand when looking at them in a list. Is the standard to assume a true state? Such as IsInRange(1, 10)? Or a false state? Such as IsNotInRange(1, 10)?

On one hand, it seems that the following, which is the inverse of the spec pattern, may be appropriate:

new TitleHasAValue().IsViolatedBy(value)


new TitleConformsToRegex(“title_regex”).IsViolatedBy(value)

Maybe I should declare both, naming one IAssertion.IsViolatedBy and IConstraint.IsSatisfiedBy?

I’m obviously using the extended pattern, using the And(), Not() and Or() pipes, but even with those, sometimes meaning isn’t clear.

Opinions? Advive?