Cool, yeah it seems that the custom validation works the same way as here:
class Uppercase implements Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
return strtoupper($value) === $value;
}
/**
* Get the validation error message.
*
* @return string
*/
public function message()
{
return 'The :attribute must be uppercase.';
}
}
This is basically the same concept as with dotnet core.
Hey Miguel, .NET Core has model validation, but this is more for custom things you want to validate manually. How does Laravel handle it?
Hi Cesar, Laravel leads with validation in requests, but that also have model validations...
laravel.com/docs/6.x/validation
Cool, yeah it seems that the custom validation works the same way as here:
This is basically the same concept as with dotnet core.
Hum cool, can you send me an example more complete ?
Actually, IAM trying to learn more about dotnet core to start doing microservices...