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
html form validation initial steps with test html file #13969
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We will need a method added here that performs the appropriate validation checks, returns true if the element validates, and false otherwise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello As described in the initial steps for the project, we have some doubts. Is it possible for you to give your email id so that we can have a discussion there? Regards |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<form> | ||
First name:<br> | ||
<input type="text" name="firstname" value="Mickey" required> | ||
<br> | ||
Last name:<br> | ||
<input type="text" name="lastname" value="Mouse" required> | ||
<br><br> | ||
<input type="submit" value="Submit"> | ||
</form> | ||
|
||
<p>If you click the "Submit" button, the form-data will be sent to a page called "action_page.php".</p> | ||
|
||
</body> | ||
</html> | ||
|
||
|
||
|
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.
This method likely needs to implement the various cases where input elements are barred from constraint validation (click the bold text to see a list of places where the term is used).