Depending on where you are in Kentico this could change. If you're on a Form, Page Type, Custom Table, or Module Class you can use the form controls validation settings on the field.
For instance if you have a text field for a first name on a page types, you select the textbox form control for the field, then scroll down a little to the validation section and enter in your custom validation message or even enter in your custom validation rule.