Subject Re: validRequired
From Mervyn Bick <invalid@invalid.invalid>
Date Wed, 12 Jan 2022 11:08:47 +0200
Newsgroups dbase.getting-started

On 2022/01/12 10:37, Milind Nighojkar wrote:
> Hello Akshat,
> Thanks for the input.
> Just to mention I am trying this validation in Grid for a date field. I could see any such property. Have I missed some thing?

In any date field in a grid trying to insert an invalid day or month
will automatically raise an error and dBASE will simply not accept the
incorrect value.

If you want to make sure that the user doesn't insert a date too far in
the future or a date already passed or if you want to make sure that,
say, the year is this year then you will need to click on the grid's
columns property and then click on the "spanner" button and select the
columns for the grid.

Once you've done this you can attach an event handler to the column's
editorcontol valid event.  If you're happy with the date entered you let
the event handler return true.  If you're not happy then return false.