Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Add required to opt out of validation #107

Merged
merged 2 commits into from
Feb 8, 2016
Merged

Add required to opt out of validation #107

merged 2 commits into from
Feb 8, 2016

Conversation

TheSharpieOne
Copy link
Contributor

Resolves #96 by adding and documenting the required attribute.
When require is false or is a scoped variable which is false,
the form validation will be removed.
This is opt out to prevent a breaking change and usually the validation is
preferred.

This change also includes the changes to use the recaptcha expired callback as they would have conflicted if made separately.

Resolves #57 by using recaptcha's expired-callback instead of a hard-coded 2 min timeout
Resolves #96 by adding and documenting the required attribute.
When require is `false` or is a scoped variable which is `false`,
the form validation will be removed.
This is opt out to prevent a breaking change and usually the validation is
preferred.
@TheSharpieOne
Copy link
Contributor Author

This also would succeed #73, rendering it obsolete.

Some differences between this and 73:
no use of ngRequired: ng prefix is for official angular team use. just required is used and since this is not a legit input, it doesn't fall under the "any value makes it required" problem.
required without a value: Often times, people use required without a value to indicate something is required. This change will do just that, 73 will not.
Slightly more DRY: Moved the common logic to it's own function.

@iambrosi
Copy link
Contributor

iambrosi commented Feb 6, 2016

I really like what you did in 4a8eb7e. You have my 👍, but I'd way for #106 to get merged before merging this one(I guess you'd have to do a rebase after merging that PR).

iambrosi added a commit that referenced this pull request Feb 8, 2016
Add required to opt out of validation
@iambrosi iambrosi merged commit 369e3e9 into VividCortex:master Feb 8, 2016
@iambrosi
Copy link
Contributor

iambrosi commented Feb 8, 2016

Thanks @TheSharpieOne !

@TheSharpieOne TheSharpieOne mentioned this pull request Feb 8, 2016
@TheSharpieOne TheSharpieOne deleted the bugfix/iss-96 branch February 18, 2016 15:32
@TheSharpieOne TheSharpieOne mentioned this pull request Apr 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants