Skip to content

Releases: ReactMVC/API-Monster

1.9.0

10 Jan 07:56
e2756de
Compare
Choose a tag to compare

Added support for arrays in .env
Added loading tailwindcss

1.8.0

10 Oct 12:23
b0c7510
Compare
Choose a tag to compare
fix

1.7.8

04 Oct 11:51
d5a4720
Compare
Choose a tag to compare
add getBody

1.7.7

01 Oct 09:55
865e61e
Compare
Choose a tag to compare
fix

1.7.6

14 Sep 06:51
c8e8983
Compare
Choose a tag to compare
fix

1.7.5

11 Sep 10:55
c1f4683
Compare
Choose a tag to compare
fix Validation

1.7.4

11 Sep 08:17
ef441aa
Compare
Choose a tag to compare

Add Data Validation

<?php

namespace Monster\App\Controllers;

use Monster\App\Models\Validation;

class HomeController
{
    public function index()
    {
        $data = [
            'name' => 'John Doe',
            'email' => 'john.doe@example.com',
            'age' => 19
        ];

        $rules = [
            'name' => 'required',
            'email' => 'required|email',
            'age' => 'number|min:1|max:3'
        ];

        $validator = new Validation($data, $rules, 'en');

        if ($validator->validate()) {
            echo 'Data is valid!';
        } else {
            $errors = $validator->getErrors();
            print_r($errors);
        }
    }
}

1.7.3

10 Sep 14:33
2505cd3
Compare
Choose a tag to compare
Update README.md

1.7.2

09 Sep 17:48
5f9e4f7
Compare
Choose a tag to compare
Update README.md

1.7.1

09 Sep 17:46
74cf99d
Compare
Choose a tag to compare
Update README.md