-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add candidate validation #79
Conversation
35cf07f
to
7f81639
Compare
@@ -85,6 +103,7 @@ var util = { | |||
} | |||
page.redirect('/error'); | |||
}, | |||
emailRegex: '[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you can use polymer paper-input
's allowedPattern
for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, but I'd rather they do something wrong and then get a warning for it than just not being allowed to write stupid stuff and not understanding why. Remember, this form will be mostly used by non-technical people.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pattern
, not allowedPattern
.
Polymer docs - A pattern to validate the input with.
What's up with this PR? |
@@ -45,8 +50,8 @@ | |||
<p>{{challenges.0.Name}}</p> | |||
</template> | |||
<template is="dom-if" if="{{!isSingleChallenge}}"> | |||
<select id="challenges" on-change="_setChallenge"> | |||
<option selected disabled>Please select a challenge</option> | |||
<select id="challenges" class$={{selectClass}} on-change="_setChallenge"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://elements.polymer-project.org/elements/paper-dropdown-menu
if we use this, we shoudn't need any custom validations and css-class hacks, and iz more beautiful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i coded this, the paper-dropdown was not available. Changing itn ow.
#121 Fixes this. |
No description provided.