Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:validator:postvalidator

This is an old revision of the document!


PostValidator

Layer: Validator · Source: lib/validator/PostValidator.php:21 (lines 21–78)


class PostValidator

Validates post form field values.

Pure validation rules with no HTTP or database dependencies. Can be tested without a web server or database connection.

Docblock Metadata

^ Tag ^ Value ^
| ''@category'' | Validator |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
| ''@since'' | Since Release 1.0 |

Inheritance

No parent, interface or trait. This is a root type.

Constants (0)

None.

Properties (1)

^ Visibility ^ Type ^ Name ^ Default ^ Line ^
| ''private'' | ''(untyped)'' | ''$formFieldLimits'' | ''[ 'post_title' => 200, 'post_summary' => 320, 'post_tags' =…'' | 24 |

Methods (1)

^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''validate()'' | Validate post data. | 37 |

validate()

public function validate(PostRequestDto $dto)

lines 37–77 (41)

Validate post data.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$dto'' | [[scriptlog:lib:dto:postrequestdto|''PostRequestDto'']] | //required// | //none// |

Returns: (none declared) — ValidationResult

Imports

^ Alias ^ Fully-qualified name ^
| ''PostRequestDto'' | [[scriptlog:lib:dto:postrequestdto|''Scriptlog\Dto\PostRequestDto'']] |

This page is generated from source by 'tools/gendoc'. Edits will be overwritten.

scriptlog/lib/validator/postvalidator.1790413761.txt.gz · Last modified: by admin