-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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) !== falseUniqueEmail- determine if the email is unique:email_exists($email) === falseUsernameExists- determine if the username exists:username_exists($username) !== falseUniqueUsername- determine if the username is unique:username_exists($username) === falseIsUuid- 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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request