Jump to content

Recommended Posts

There is a whole spectrum of things that I might commonly validate on. Basic things like minimum/maximum lengths (of strings, of items in a collection, etc.), character restrictions (alphanumeric, etc.) to whether a specified value (e.g. an order under) satisfies our application-specific structure, any form of user input so things like telephone numbers, credit card numbers, URLs, email addresses, date and times, and so on.

 

Also I would bear in mind that regular expressions, while a useful tool, are not a catch-all solution. You'll probably want to use "basic" string/number/etc. functions and much more complex logic all alongside some regex, as part of the validation.

Link to comment
https://forums.phpfreaks.com/topic/198845-pcre-expressions/#findComment-1043739
Share on other sites

yeah i know that filter functions are awsome there is not way you can't love them and not start using them when you have everything you need right there :D.

And yes i think it's really hard to make this class work out the way it should be i need to consider many things, approaches, and existing functions not only regular expressions.

Link to comment
https://forums.phpfreaks.com/topic/198845-pcre-expressions/#findComment-1044067
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.