Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

pbochis
Copy link
Contributor

@pbochis pbochis commented Sep 10, 2015

No description provided.

@@ -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])?',
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@lorenzleutgeb
Copy link
Contributor

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">
Copy link
Contributor

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

Copy link
Contributor Author

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.

@pbochis
Copy link
Contributor Author

pbochis commented Oct 16, 2015

#121 Fixes this.

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.

4 participants