diff --git a/validFluent.php b/validFluent.php index 69292d4..677be57 100644 --- a/validFluent.php +++ b/validFluent.php @@ -11,99 +11,83 @@ * andsoa77@gmail.com * * typical use: - - $valid = new ValidFluent($_POST); - - $valid->name('user_name')->required('You must choose a user name!')->alfa()->minSize(5); - - $valid->name('user_email')->required()->email(); - - $valid->name('birthdate')->date('please enter date in YYYY-MM-DD format'); - - if ($valid->isGroupValid()) - echo 'Validation Passed!'; - + $valid = new ValidFluent($_POST); + $valid->name('user_name')->required('You must choose a user name!')->alfa()->minSize(5); + $valid->name('user_email')->required()->email(); + $valid->name('birthdate')->date('please enter date in YYYY-MM-DD format'); + if ($valid->isGroupValid()) + echo 'Validation Passed!'; * ////////////////////////////////////// * OR - * - $valid = new ValidFluent($_POST); - - if ( $valid->name('user_name')->required('You must choose a user name!')->alfa()->minSize(5) - ->name('user_email')->required()->email() - ->name('birthdate')->date('please enter date in YYYY-MM-DD format') - ->isGroupValid() ) - echo 'Validation passed!'; - - + * + $valid = new ValidFluent($_POST); + if ( $valid->name('user_name')->required('You must choose a user name!')->alfa()->minSize(5) + ->name('user_email')->required()->email() + ->name('birthdate')->date('please enter date in YYYY-MM-DD format') + ->isGroupValid() ) + echo 'Validation passed!'; * ////////////////////////////////////////////////////////////////// * On HTML -