To use the validation options built in to FileMaker, open Manage | Database | Fields and double click a data (not a calculation) field.
In the Field Options dialog that pops up is a validation tab. This lists the various options for selecting a validation rule for you field. This includes a calculation option where you can create your own validation calculation such as:
Month ( Self ) < 4
to limit dates entered into a date field to January through March dates.
There's also an option for specifying your own custom validation message to popup when a validation rule is violated.
The custom validation message does limit you to simple text messages--you can't define a calculation here and this creates awkward validation error messages if you have set several different validation rules for your field. (You can't display different messages for each rule and thus can't tell them which error was comitted.)
Thus, some developers set up these rules in Field options, but then back up these settings with a script triggered script that intercepts the error and presents a more diagnostic error message than is possible with a straight text "one size fits all" validation error message.