PHP Web development commonly used in three form validation functions, these are some of the frequently used judgment function.
ISSET ();--suitable for detecting the presence of this parameter. Definition and scope: used to test whether a variable has a value (including 0,false, or an empty string, but not null), that is: "...?" Fo= "can also be detected and therefore not applicable. However, if the URL pa
Angular.module (' Com.ngnice.app '). Directive (' Bffielderror ',functionBffielderror ($compile) {return { //restricted to be used only in the form of attributes (Attribute).Restrict: ' EA ', //there must be a Ng-model attribute on this element, and if not, it will be an error .Require: ' Ngmodel ', //The link function is automatically executed when the current instruction is initializedLinkfunction(scope, element, Attrs, Ngmodel)
Because the article new or other data volume than the larger form of the new, we can first use a piece of data to complete the new, if successful, we copy the line to avoid errors!HTML section (* must be jpg,gif,png, size 200KB)PageView: PHP Controller SectionPrivate function Add () {if (isset ($_post[' send ')) {if (Validate::checknull ($_post[' title '))) Tool::alertback (' Warning: Title must not be empt
Compatible: Opera 9.6 + Chrome 2.0 + FF 3 + IE 6 effect: Verify while entering one side Image Environment: Ruby 1.8.6 + rails 2.1.0 + Windows Core code: HTML: browser disables JavaScript when displaying a message: copy code code as follows: when the browser disables JS, the Submit button is not available to implement client-side validation! copy code code as follows: $ ("Js_support"). Style
Earlier I demonstrated the angular form validation example: Angularjs's Form validation example, in fact, we can use angular provided module messages for easier form validation,
The HTML
Tags: BSP technology share SRC size Verify required RMS textEffect and basic use of 1.1 modelform1. Form function 1. function 1: Verify 2. function 2: Generate HTML Tag (default function: Keep last committed value) 3. Function 3: data operation 4. Function 4: HTML form submission holds last commit data 5, fu
First, several element records used in the form validation
1.htmlspecialchars (), which is used to escape the special characters entered by the user as normal, such as
2.$_server["Php_self" is a super global variable that returns the current page script name
3.trim () used to remove extra spaces, etc.
4.stripslashes () to remove user-input backslash
Second simple form
JavaScript form Programming:
How to find a FORM element:
1.var Oform=document.getelementbyid ("Form1");
2.var oform=document.forms[form1]//through name lookup;
Two. Common features of form fields:
Disabled: This property is used to indicate whether a form control is available;
Autor: Editor of the Prodigal Son
From:http://bbs.51js.com/thread-68161-1-1.html
Form Validation Class
function Validatorclass ()
{
var IsError = false;
Check the name, you can only enter Chinese, letters, numbers, underscores
This. Chkname = function (obj,msg)
{
if (IsError) return;
if (Obj.value.Trim (). length}
Check email address
This. Chkemail = function (
---------------------------------Genius, learn God, Daniel, Hacker please bypass the de split line-----------------------------------------------------------------------Well, this may be relatively simple, forgive me this weak for the first time to do. NET also looked for long data, so paste out, avoid everyone again detours.Because the button for HTML is not a server-side control, you have to change the following to jump to the background. Code f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.