This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 587e3a7  Cleans up doc
587e3a7 is described below

commit 587e3a7caeaf0c771b560b188fce240e37657183
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Wed Jan 20 08:45:32 2021 +0100

    Cleans up doc
---
 .../pure-java-script-client-side-validation.md     | 47 +++++++++++-----------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/source/core-developers/pure-java-script-client-side-validation.md 
b/source/core-developers/pure-java-script-client-side-validation.md
index c4f2cab..72e388e 100644
--- a/source/core-developers/pure-java-script-client-side-validation.md
+++ b/source/core-developers/pure-java-script-client-side-validation.md
@@ -4,15 +4,20 @@ title: Pure JavaScript Client Side Validation
 ---
 
 # Pure JavaScript Client Side Validation
+{:.no_toc}
 
-Pure JavaScript client side validation is the simplest but least feature\-rich 
type of [Client Side Validation](client-side-validation.html). 
-This type of validation uses 100% client\-side JavaScript code to try to 
validate the values entered by the user. 
+* Will be replaced with the ToC, excluding a header
+{:toc}
+
+## Description
+
+Pure JavaScript client side validation is the simplest but least feature-rich 
type of [Client Side Validation](client-side-validation). 
+This type of validation uses 100% client-side JavaScript code to try to 
validate the values entered by the user. 
 Because the validation logic is actually repeated in the JavaScript code, it 
is important to understand that 
-some values will be considered acceptable by the JavaScript code but will be 
marked as unacceptable by the server\-side [Validation](validation.html).
+some values will be considered acceptable by the JavaScript code but will be 
marked as unacceptable by the server-side [Validation](validation).
 
+Only the following validators are supported:
 
-{% comment %}start snippet 
id=supported-validators|url=struts2/core/src/main/resources/template/xhtml/form-close-validate.ftl
 {% endcomment %}
-<p>Only the following validators are supported:
 * required validator
 * requiredstring validator
 * stringlength validator
@@ -21,28 +26,22 @@ some values will be considered acceptable by the JavaScript 
code but will be mar
 * url validator
 * int validator
 * double validator
-</p>
-{% comment %}end snippet 
id=supported-validators|url=struts2/core/src/main/resources/template/xhtml/form-close-validate.ftl
 {% endcomment %}
-
-
-> 
-
-> 
-
-> JavaScript client validation is not available for visitor validations\.
-
-> 
-
-__Error reporting__
-
-Because client side validation does not talk to the server, the theme (_xhtml 
theme_  or _css\_xhtml theme_ ) is responsible for properly manipulating the 
HTML DOM to display the error message inline\. The JavaScript that is 
responsible for doing this logic is `validation.js` and can be found in each 
theme\.
 
+> JavaScript client validation is not available for visitor validations.
 
+## Error reporting
 
-| Errors are reported using the default validation message, not the 
internationalized version that the server\-side might be aware of\. This is a 
known issue\. You may want to try the [AJAX Client Side 
Validation](ajax-client-side-validation.html) for messages that are fully 
internationalized\.
+Because client side validation does not talk to the server, the theme (_xhtml 
theme_  or _css_xhtml theme_ ) is responsible 
+for properly manipulating the HTML DOM to display the error message inline. 
The JavaScript that is responsible for doing 
+this logic is `validation.js` and can be found in each theme.
 
-| 
+> Errors are reported using the default validation message, not the 
internationalized version that the server-side might 
+> be aware of. This is a known issue. You may want to try the [AJAX Client 
Side Validation](ajax-client-side-validation) 
+> for messages that are fully internationalized.
 
-__Additional Validator Support__
+## Additional Validator Support
 
-If you wish to add additional validator support beyond those listed, you may 
override the _xhtml theme_  teamplte `form-close-validate.ftl`\. This file 
contains the JavaScript that tries to validate each user\-entered value from 
within the browswer\. The _css\_xhtml theme_  extends the _xhtml theme_  and 
therefore doesn't have it's own form\-close\-validate\.ftl template\.
+If you wish to add additional validator support beyond those listed, you may 
override the _xhtml theme_  template 
+`form-close-validate.ftl`. This file contains the JavaScript that tries to 
validate each user-entered value from within 
+the browser. The _css_xhtml theme_  extends the _xhtml theme_  and therefore 
doesn't have its own `form-close-validate.ftl`
+template.

Reply via email to