Added property comparison validations to Self Aware Objects projects

I just uploaded an update to my Self Aware Objects project on Github (https://github.com/ScottLilly/DotNetSelfAwareObjects).

This update lets you add new validations to your classes that compare the values of two properties.  So, if you want to ensure that the value for Property1 is greater than the value of Property2, you can have that rule defined by an SAO attribute.

The new validations are:

MustBeGreaterThan

MustBeGreaterThenOrEqualTo

MustBeLessThan

MustBeLessThanOrEqualTo

MustHaveSameValueAs  (This is useful for when you want someone to enter their password, have a second field for them to re-enter it – to confirm they haven’t mistyped it in the first field.)

Lately, I’ve been focusing on an experimental ORM I’m building.  So I haven’t been doing much to the SAO project.  If you’re using the project, and want to see something specific added, let me know.  I should be able to find some time for it.

Leave a Reply

Your email address will not be published. Required fields are marked *