Jump to content

Regexp in Expected Input Format

Featured Replies

Posted

The aaaa dddd system is VERY limiting. You can basically just have it in fields that can only be in one way, and even then it's limiting.

Example:

Birth dates

dddddd => 830113 => passes!
dddddd => 830170 => passes!

Whoa? That's not a correct birth date!

Let's try it with regexp:

/^\d{2}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/

I just wrote this so it might not work fully, but my point is, you can match a birth date pretty accurately with regexp.

Let's take another example, where you are supposed to fill in which class you are in (ranging from 1 to 11).

dd => 1 => does not pass!
d => 11 => does not pass!

Wait, so either 1-9 does not pass, or 10-11 does not pass? That's not acceptable.

Regexp:

/^([1-9]|1[0-1])$/

Simple.



If I'm not mistaken, your simplified system already makes use of regexp, but adds another layer making it more easy to understand for your customers. The result being that it's VERY limiting and almost useless. Why not add an option to use regexp, for us who know how to use it and need it for our custom profile fields...?

  • 2 months later...

Big time agreement. Great idea.

  • 1 month later...

This seems to have gone unnoticed but I need some SteamID checking!

  • 3 months later...

In case Stanlee you are subscribed to this topic and you still need this fixed:

http://community.invisionpower.com/topic/336406-add-link-to-profile-field-description/page__view__findpost__p__2205689

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.