Skip to content

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 18, 2016

Fixes #12082.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this alternative:

  • Create a new method isValidFullName that returns a boolean and never throws.
  • validateFullName could internally call isValidFullName, as could has.
  • validateFullName could continue to throw.

I think this works because validateFullName sounds imperative and I would expect it to throw, plus the tolerant param seems a bit iffy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 will update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just updated. Thanks again, this is a much better pattern.

@dgeb dgeb merged commit 97a2d96 into emberjs:master Apr 18, 2016
@dgeb
Copy link
Member

dgeb commented Apr 18, 2016

Looks a lot better to me. Thanks @rwjblue 👍

@rwjblue rwjblue deleted the beef-up-regexp branch July 5, 2016 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants