You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are many WordPress specific reasons to validate user input, it would be nice to have some more validation rules in the framework core.
Describe the solution you'd like
Among other rules the following would be a nice addition:
EmailExists - determine if the email already exists: email_exists($email) !== false
UniqueEmail - determine if the email is unique: email_exists($email) === false
UsernameExists - determine if the username exists: username_exists($username) !== false
UniqueUsername - determine if the username is unique: username_exists($username) === false
IsUuid - is a valid UUID: Str::isUuid($uuid)
PostTypeExists - determine if the post type exists: post_type_exists($post_type)
TaxonomyExists - determine if the taxonomy exists: taxonomy_exists($taxonomy)
TermExists - determine if the term exists: (bool) term_exists($term)
Describe alternatives you've considered
I can create custom rules but this is repetitive for multiple projects.
Additional context
There are probably more useful rules, and perhaps the Exists and Unique rules can be made reusable instead of strictly for the email/username
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There are many WordPress specific reasons to validate user input, it would be nice to have some more validation rules in the framework core.
Describe the solution you'd like
Among other rules the following would be a nice addition:
EmailExists
- determine if the email already exists:email_exists($email) !== false
UniqueEmail
- determine if the email is unique:email_exists($email) === false
UsernameExists
- determine if the username exists:username_exists($username) !== false
UniqueUsername
- determine if the username is unique:username_exists($username) === false
IsUuid
- is a valid UUID:Str::isUuid($uuid)
PostTypeExists
- determine if the post type exists:post_type_exists($post_type)
TaxonomyExists
- determine if the taxonomy exists:taxonomy_exists($taxonomy)
TermExists
- determine if the term exists:(bool) term_exists($term)
Describe alternatives you've considered
I can create custom rules but this is repetitive for multiple projects.
Additional context
There are probably more useful rules, and perhaps the
Exists
andUnique
rules can be made reusable instead of strictly for the email/usernameThe text was updated successfully, but these errors were encountered: