diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-11-25 06:49:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-25 06:49:44 -0800 |
commit | beec035eb0ff6babf48ce836184329e60e795177 (patch) | |
tree | eb068bd81c2a2ffe802398bb521d9ed2beadf21d /components/script/dom/validation.rs | |
parent | 67a4ecd68ec782fd661c0095df1e7f75e79a5d84 (diff) | |
parent | 2a408778518050d3632ad5c2694a96ae0b219cd9 (diff) | |
download | servo-beec035eb0ff6babf48ce836184329e60e795177.tar.gz servo-beec035eb0ff6babf48ce836184329e60e795177.zip |
Auto merge of #13969 - bbansalWolfPack:master, r=jdm
html form validation initial steps with test html file
<!-- Please describe your changes on the following line: -->
Added code for initial steps in html form validation.
1. Added methods for trait validatable
2. implemented stub methods for elements like HTMLInputElement, HTMLButtonElement, etc
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X ] `./mach build -d` does not report any errors
- [ X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13969)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/validation.rs')
-rwxr-xr-x[-rw-r--r--] | components/script/dom/validation.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/dom/validation.rs b/components/script/dom/validation.rs index e9a6a156848..7ba915092a2 100644..100755 --- a/components/script/dom/validation.rs +++ b/components/script/dom/validation.rs @@ -1,5 +1,9 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use dom::validitystate::ValidationFlags; -pub trait Validatable {} +pub trait Validatable { + fn is_instance_validatable(&self) -> bool { true } + fn validate(&self, _validate_flags: ValidationFlags) -> bool { true } +} |