Validation in Custom Field Classes?  Question - NOT an Issue
Putting it in a check constraint means needing to use a database-provided function. Unless you're using sqlite and will always have such a user-defined function available, I'm not sure how you would do this.

Peewee does not really do validation in the `db_value()` or `python_value()` methods. This should be handled at the layer that is accepting user input, e.g. a web form. The `db_value()` and `python_value()` methods are solely intended for converting between python-native types and whatever the underlying storage engine driver returns. For example, converting a `Path` object to a string instance and vice-versa.

The handling of the validation would be better done somewhere up the stack, in my experience, where you will have a better chance of informing the user or caller of the problem and allowing them to fix the issue. Thanks for your clarification.
I will always and only be using SQLite for the back-end.  These are small projects for my personal use.  Based on your feedback, I will move these Path validations to `check` functions managed by `@pre_init` decorators for the tables.
A custom field to store/retrieve folder/directory path names is:
```
class FolderField (TextField):
    """ custom peewee field type for folder (directory) path name """
    def db_value (self, name :str) -> Path:
        """ database string to Python Path converter """
        if not ( path := Path (name) ) .is_dir() : raise ValueError ('retrieved {name=} is not an existing folder')
        return path
    def python_value (self, path :Path) -> str:
        """ Python Path to database string converter """
        if not path.is_dir() : raise ValueError ('submitted {path=} is not an existing folder')
        return str (path)

```
which performs validation to ensure the str|Path name refers to an existing directory.

Is this bad practice?  Would it be better to perform this validation in a `check` function associated with the tables using the `FolderField`?

Thanks for this great library!