Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel: validate an integer field that needs to be greater than another

gt - greater than
gte - greater than equal to
lt - less than
lte - less than equal to

//so using gt you can check that your end_page should be greater than your initial_page and your task becomes very easy now:

$rules = [
  'initial_page' => 'required_with:end_page|integer|min:1|digits_between: 1,5',
  'end_page' => 'required_with:initial_page|integer|gt:initial_page|digits_between:1,5'
]; 
Comment

PREVIOUS NEXT
Code Example
Php :: Laravel function to check if image exist or not 
Php :: merge three array in php 
Php :: php select disable submit no value 
Php :: undefined function bcmul php linux 
Php :: PHP DocBlocker current date 
Php :: white labeling wordpress divi 
Php :: php even odd 
Php :: laravel connection timed out 
Php :: PHP nl2br — Inserts HTML line breaks before all newlines in a string 
Php :: what returns livewire mount 
Php :: set owner symfony 
Php :: How to on auto_recording using zoom api in php 
Php :: how can we manage category and product in laravek 
Php :: Get page title, excerpt or content by Name of the Page 
Php :: is_wplogin 
Php :: Yii2 Dynamic Relational, Eager loading 
Php :: quitar elemento array php 
Php :: the_fiel 
Php :: use middleware in controller to have access session 
Php :: registration welcome email laravel 
Php :: how to check if a user sent you money in paypal in php 
Php :: country 
Php :: php if equal 
Php :: print_r php 8 
Php :: Paginating API HTTP Response in Laravel 
Php :: how to make a timer in php 
Php :: use php-fpm with apache 
Java :: jlabel text center 
Java :: import javax.validation.valid error 
Java :: string to date android 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =