Basic post validation system #41

Open
opened 2025-04-04 14:50:21 +02:00 by kazhnuz · 1 comment
Owner

-> Wrapper around the $_POST
-> $postData->addRuleFilter("value", FILTER_CONSTANT, "Error message")
-> $postData->addRuleRequired("value", "Error message");
-> $postData->addRuleRegex("value", regex, "Error message")
-> $postData->validate() -> return true if it's valide
-> $postData->errors() -> return the error list
-> $postData->get(data) -> Get a specific value

Add a render->fromPostData() that take an array of "ignore".

-> Wrapper around the $_POST -> $postData->addRuleFilter("value", FILTER_CONSTANT, "Error message") -> $postData->addRuleRequired("value", "Error message"); -> $postData->addRuleRegex("value", regex, "Error message") -> $postData->validate() -> return true if it's valide -> $postData->errors() -> return the error list -> $postData->get(data) -> Get a specific value Add a render->fromPostData() that take an array of "ignore".
kazhnuz added the
Kind/Enhancement
Priority
High
labels 2025-04-04 14:50:21 +02:00
Author
Owner

Will be used for the subscribe, and even stuff like the login form

Will be used for the subscribe, and even stuff like the login form
kazhnuz added this to the Code modernisation project 2025-04-07 12:32:19 +02:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: game-projects/dragon-forks#41
No description provided.