Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

add US2ConditionRegex and change to easy use US2ValidateTextField #21

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

No description provided.

my commit in the master, If need the necessary changes to other branch please tell me. thank you~

Contributor

alexfish commented Jan 14, 2013

This is a nice idea, although i can't help but feel that this could be integrated into US2Condition at the base class layer. It doesn't seem correct having this functionality as an independent class.

My thinking is adding a regex property to the base US2Condition class which can be overwritten by US2ConditionEmail and other classes that require regex to function, much more elegant.

Or another option is a US2ConditionRegex class which US2ConditionEmail etc is subclassed from. Personally though i prefer the first option.

What do you think @martinstolz @iceydee?

Contributor

iceydee commented Jan 15, 2013

Totally agree. Shouldn't impose a specific implementation with the class
name itself.

On Monday, January 14, 2013, Alex Fish wrote:

This is a nice idea, although i can't help but feel that this could be
integrated into US2Condition at the base class layer. It doesn't seem
correct having this functionality as an independent class.

My thinking is adding a regex property to the base US2Condition which can
be overwritten by US2ConditionEmail and other classes that require regex
to function, much more elegant.

What do you think @martinstolz https://github.com/martinstolz @iceydeehttps://github.com/iceydee
?


Reply to this email directly or view it on GitHubhttps://github.com/ustwo/US2FormValidator/pull/21#issuecomment-12228284.

Contributor

alexfish commented Jan 16, 2013

Ok i've implemented the changes: acc4d5c so will close this pull request.

@hpyhacking thanks for the original idea on this one, it's a nice feature to have in place.

@alexfish alexfish closed this Jan 16, 2013

: )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment