diff --git a/manual/codes/Getting started - Setting table definition - Constraints and validators.php b/manual/codes/Getting started - Setting table definition - Constraints and validators.php index e69de29bb..d7da54366 100644 --- a/manual/codes/Getting started - Setting table definition - Constraints and validators.php +++ b/manual/codes/Getting started - Setting table definition - Constraints and validators.php @@ -0,0 +1,15 @@ +hasColumn("name", "string", 50, "nospace"); + + // the email should be a valid email + $this->hasColumn("email", "string", 200, "email"); + + // home_country should be a valid country code + $this->hasColumn("home_country", "string", 2, "country"); + + } +} +?>