# phpgt-DomValidation **Repository Path**: wfdaj/phpgt-dom-validation ## Basic Information - **Project Name**: phpgt-DomValidation - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-03 - **Last Updated**: 2024-05-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Server side form validation using web standards. ------------------------------------------------ HTML forms can be annotated in such a way that the individual input elements can describe their own validation rules. The simplest annotation is the `required` attribute, which can be specified on input elements to indicate that the form is not to be submitted until a value is given. This repository performs W3C form validation for projects that have a [server-side DOM][dom], such as within [WebEngine applications][webengine]. *** Build status Code quality Code coverage Current version PHP.Gt/DomValidation documentation ## Example usage ```html
``` The above HTML will be validated on the client as usual, but using the PHP below will also provide server-side validation without any additional validation logic to be written. Validation rules present in the above HTML form: + `name` input is required to be not empty. + `email` input is required to be not empty, and must be a valid email address. + `account` input is not required, but when a value is submitted, it must match the provided regular expression (any number of non-whitespace characters followed by up to 3 numbers). + `nation` input must be one of the three enumerations present in the `` and `` elements, their contained options are used as validation enumerations, meaning that values that are not part of the contained options will throw validation errors. [dom]: https://www.php.gt/dom [webengine]: https://www.php.gt/webengine