Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 20, 2019 17:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/1459d5412f611e35ced9d9f8691d8f27 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AgregarArticuloDeInventarioRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
"fechaAdquisicion" => "required|date_format:Y-m-d",
"codigo" => "required|max:255",
"numeroFolioComprobante" => "max:255",
"descripcion" => "required|max:255",
"estado" => "required|in:regular,malo,inservible,noEncontrado",
"observaciones" => "max:255",
"costoAdquisicion" => "required|numeric|between:1,99999999.99",
"areas_id" => "required|exists:areas,id",//Requerido y que exista en áreas, columna id :)
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment