mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
html form validation initial steps with test html file, added stub methods, added code to handle validations
This commit is contained in:
parent
e4fcc066d1
commit
2a40877851
9 changed files with 124 additions and 15 deletions
13
components/script/dom/htmlselectelement.rs
Normal file → Executable file
13
components/script/dom/htmlselectelement.rs
Normal file → Executable file
|
@ -28,7 +28,7 @@ use dom::htmloptionscollection::HTMLOptionsCollection;
|
|||
use dom::node::{Node, UnbindContext, window_from_node};
|
||||
use dom::nodelist::NodeList;
|
||||
use dom::validation::Validatable;
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::validitystate::{ValidityState, ValidationFlags};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use string_cache::Atom;
|
||||
use style::attr::AttrValue;
|
||||
|
@ -384,4 +384,13 @@ impl VirtualMethods for HTMLSelectElement {
|
|||
|
||||
impl FormControl for HTMLSelectElement {}
|
||||
|
||||
impl Validatable for HTMLSelectElement {}
|
||||
impl Validatable for HTMLSelectElement {
|
||||
fn is_instance_validatable(&self) -> bool {
|
||||
true
|
||||
}
|
||||
fn validate(&self, validate_flags: ValidationFlags) -> bool {
|
||||
if validate_flags.is_empty() {}
|
||||
// Need more flag check for different validation types later
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue