-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue/2159 validate settings (#2233)
Adds a possibility to validate setting fields. Supports the following rules: required, max, min, email, integer, matches. Rules example: ``` 'validation' => [ [ 'rule' => 'required', 'message' => __( 'Field is required', 'gk-gravityview' ), ], [ 'rule' => 'max:12', 'message' => __( 'Should be less or equal 12', 'gk-gravityview' ), ], ]; ``` Currently supports only frontend validation. We can improve it with a backend validation using the same validation config. Added a "Validate URL with tags" rule for "'No Entries Redirect URL'" and "Edit Entry Redirect URL" using the "required" and "matches" rules. Here is the URL rule Regex - https://regex101.com/r/I2QSEI/1 💾 [Build file](https://www.dropbox.com/scl/fi/0cwgzmrbn8abisyorq074/gravityview-2.32-619e85cb9.zip?rlkey=nfaugp0czc32sdw3i9njx8ag4&dl=1) (619e85c).
- Loading branch information
Showing
9 changed files
with
244 additions
and
99 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.