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

Improvements in flexibility and user-friendliness. #97

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

Flaise commented Mar 8, 2014

  • Made it so that the '%s' in error strings is optional so non-formatted strings can be used for errors where calling a field by name is unnecessary.
  • Added an alphanumeric validator for convenience.
  • Changed the default message of the required validator from '%s is required.' to 'This field is required.' because any sensibly laid out form already makes it obvious what field an error refers to.
Improvements in flexibility and user-friendliness.
- Made it so that the '%s' in error strings is optional so non-formatted strings can be used for errors where calling a field by name is unnecessary.
- Added an alphanumeric validator for convenience.
- Changed the default message of the required validator from '%s is required.' to 'This field is required.' because any sensibly laid out form already makes it obvious what field an error refers to.

@ljharb ljharb commented on the diff Mar 8, 2014

.gitignore
@@ -1 +1,2 @@
node_modules/
+.idea/
@ljharb

ljharb Mar 8, 2014

Collaborator

please add this to your ~/.gitignore - IDE-specific things shouldn't be stored in repos.

Collaborator

ljharb commented Mar 8, 2014

These are three separate things; please make them into three PRs.

The alphanumeric validator I'll accept (with tests) immediately.

In the separate PRs, can you provide more info about your use case? With regard to "any sensibly laid out form already makes it obvious what field an error refers to", not only are most forms not necessarily sensibly laid out, but clear text is absolutely critical for accessibility - how can a blind user, for example, know based on the layout which field an error refers to?

@ljharb ljharb closed this Mar 8, 2014

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