<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zxiao2</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zxiao2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Zxiao2"/>
	<updated>2026-08-19T14:12:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=106842</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=106842"/>
		<updated>2016-12-13T08:48:44Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* UML Class Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
&lt;br /&gt;
1. Wrong position of '.'&lt;br /&gt;
&lt;br /&gt;
[[File:1error.png]]&lt;br /&gt;
&lt;br /&gt;
2. Missing @&lt;br /&gt;
&lt;br /&gt;
[[File:2error.png]]&lt;br /&gt;
&lt;br /&gt;
3. Missing part after @&lt;br /&gt;
&lt;br /&gt;
[[File:3error.png]]&lt;br /&gt;
&lt;br /&gt;
4. Null input&lt;br /&gt;
&lt;br /&gt;
[[File:4error.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
[[File:5.png]]&lt;br /&gt;
&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram.&lt;br /&gt;
&lt;br /&gt;
[[File:Servo_validity_state_uml.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
UML plot for HTML elements are shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Servo_html_element_uml.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implement the checkValidity===&lt;br /&gt;
The major part of the design is to complete the implementation of ValidityStateMethods in servo/components/script/dom/validitystate.rs. The current existing codes are listed as follow:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
impl ValidityStateMethods for ValidityState {&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-valuemissing&lt;br /&gt;
    fn ValueMissing(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-typemismatch&lt;br /&gt;
    fn TypeMismatch(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-patternmismatch&lt;br /&gt;
    fn PatternMismatch(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-toolong&lt;br /&gt;
    fn TooLong(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-tooshort&lt;br /&gt;
    fn TooShort(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-rangeunderflow&lt;br /&gt;
    fn RangeUnderflow(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-rangeoverflow&lt;br /&gt;
    fn RangeOverflow(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-stepmismatch&lt;br /&gt;
    fn StepMismatch(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-badinput&lt;br /&gt;
    fn BadInput(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-customerror&lt;br /&gt;
    fn CustomError(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // https://html.spec.whatwg.org/multipage/#dom-validitystate-valid&lt;br /&gt;
    fn Valid(&amp;amp;self) -&amp;gt; bool {&lt;br /&gt;
        false&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Servo_html_element_uml.png&amp;diff=106841</id>
		<title>File:Servo html element uml.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Servo_html_element_uml.png&amp;diff=106841"/>
		<updated>2016-12-13T08:45:57Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Servo_validity_state_uml.png&amp;diff=106840</id>
		<title>File:Servo validity state uml.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Servo_validity_state_uml.png&amp;diff=106840"/>
		<updated>2016-12-13T08:45:32Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105258</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105258"/>
		<updated>2016-11-10T03:15:44Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* Design Patterns &amp;amp; OO Practices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since this project is a continueing projecy from OSS M1653, and we are taking over from the previous group, we are not going to modify the design pattern from previous project. So we will still keep the enum to bitflag change proposed last time. We will also follow servo project work flow as well as DRY priciple in OO design.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105209</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105209"/>
		<updated>2016-11-10T02:32:17Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* Test from UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=105194</id>
		<title>CSC/ECE 517 Fall 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=105194"/>
		<updated>2016-11-10T02:20:20Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* Writing Assignments 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.example.com link title]==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (Firebrick JS)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Active Job)]]&lt;br /&gt;
==Writing Assignments 2==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1631. Refactoring Bidding Interface]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1671. Unit Tests for participants.rb Hierarchy]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1668.Test e-mailing functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1658. Refractor lottery_controller.rb and write integration tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1650. Sort instructor views alphabetically by default]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1645. Refactoring Tree Display Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1659. Refactor on_the_fly_calc.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1653. Fix and improve rubric criteria]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1642. Refactor review_response_map.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1633. Refactor different question types from quiz feature]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1654. Improve_date-picker_and_deadlines]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1652 Fix teammate advertisements and requests to join a team ]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1662. UI issues/fixes]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1673. Refactor question_type.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1675. Timestamp for student file &amp;amp; hyperlink submissions]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1640. Refactor response.rb and response_helper.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1634. Refactor and write unit test of due_date.rb and deadline_helper.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1654._Improve_network_security_features]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1670._Unit_tests_for_answers.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1641. Refactor review_mapping_controller.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1652_Implement_ImageMap_Support_Servo]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1648/Add_past_due_assignment]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1656. Improve imports]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1653_Implement_HTML_form_validation]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1635._Refactor_join_team_requests_controller.rb_and_invitation_controller.rb]]&lt;br /&gt;
&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1696  Improve Self-Review]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1676  Role-based reviewing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1680. Improve survey functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1693. Drag-and-drop interface for creating rubrics]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1701. Accelerate RSpec testing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1705. Tracking the time students look at the others' submissions]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1707: Top trading cycles to exclude previous teammates]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1678: Review configuration options]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1682: Improve score calculation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1684: Feature Test for Assignment Submission]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1689: Anonymous Chat Between Author and Reviewer]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1703: Logging for Expertiza]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1708: Improvements to staggered-deadline assignments]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1685: UI changes for review and score reports]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/ E1700 Integrate Google doc editor/viewer]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1652_ImageMap_Support_Servo]]&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1635._Refactor_join_team_requests_controller.rb_and_invitation_controller.rb&amp;diff=104021</id>
		<title>CSC/ECE 517 Fall 2016/E1635. Refactor join team requests controller.rb and invitation controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1635._Refactor_join_team_requests_controller.rb_and_invitation_controller.rb&amp;diff=104021"/>
		<updated>2016-10-30T08:34:24Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== E1635. Refactor invitations controller.rb ==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
* Renamed the &amp;quot;invitation_controller.rb&amp;quot; to &amp;quot;invitation_controller.rb&amp;quot;&lt;br /&gt;
* For simple if nested in else, we changed it to elsif and thus decreased number of layers in the if nest.&lt;br /&gt;
* For added comments to explains what each method does and explaining important variables&lt;br /&gt;
* refactored the create and update methods&lt;br /&gt;
* changed the wordings of the flash messages to make them more meaningful&lt;br /&gt;
&lt;br /&gt;
== InvitationController==&lt;br /&gt;
&lt;br /&gt;
* Rename to invitations_controller.rb, in accordance with current naming convention.&lt;br /&gt;
* Convert if nested inside else to elsif.&lt;br /&gt;
* Add comments explaining what each method does, and comments on how important variables are used.&lt;br /&gt;
* Refactor create and accept methods. Shorten and clarify them by adding private methods (e.g. extract a ready_to_join? method and call it from accept method)&lt;br /&gt;
* Change awkward flash messages.&lt;br /&gt;
&lt;br /&gt;
== JoinTeamRequestsController==&lt;br /&gt;
&lt;br /&gt;
* Add comments on some important variables.&lt;br /&gt;
* Convert if nested inside else to elsif&lt;br /&gt;
* Remove duplicate code: Common code in index, show and new method are moved into a private method. &lt;br /&gt;
* Create and update do not share any code. This raises the spectre of DRY problems. Make sure that all functionality used in creating a request is available when editing a request, and that no code is duplicated.&lt;br /&gt;
* Fix wording of message.&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1635._Refactor_join_team_requests_controller.rb_and_invitation_controller.rb&amp;diff=104019</id>
		<title>CSC/ECE 517 Fall 2016/E1635. Refactor join team requests controller.rb and invitation controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1635._Refactor_join_team_requests_controller.rb_and_invitation_controller.rb&amp;diff=104019"/>
		<updated>2016-10-30T06:37:29Z</updated>

		<summary type="html">&lt;p&gt;Zxiao2: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== E1635. Refactor invitations controller.rb ==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
===About Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
* Renamed the &amp;quot;invitation_controller.rb&amp;quot; to &amp;quot;invitation_controller.rb&amp;quot;&lt;br /&gt;
* For simple if nested in else, we changed it to elsif and thus decreased number of layers in the if nest.&lt;br /&gt;
* For added comments to explains what each method does and explaining important variables&lt;br /&gt;
* refactored the create and update methods&lt;br /&gt;
* changed the wordings of the flash messages to make them more meaningful&lt;/div&gt;</summary>
		<author><name>Zxiao2</name></author>
	</entry>
</feed>