OP, your code as originally posted should work I would think... what does dd($_POST) (assuming it was POSTed) look like when validation fails? What are the actual validation error messages from the validator for the "active" field?
You can also do this without the hidden input by simply using the sometimes rule if you have a default value for 'active' to 0.
'active' => 'sometimes|boolean'
$adopted = (isset($_POST['adopted']) == '1' ? '1' : '0');
Just a note to the OP that this code would only work without the hidden active. First, isset returns a boolean true/false, so why compare it to 1? Simply $adopted = isset($_POST['adopted']) does what you are doing but type-correct. Second, As we move to type hinting and more type strictness in what's accepted as "good" PHP, I think it's important to point out the return values should be true : false, or 1 : 0 - not the strings '1' or '0'.
Just IMO but a cleaner way of doing this: (or 1 instead of true)
PHP: $adopted = ($_POST['adopted'] ?? false) == true;
Laravel: $adopted = (request('adopted') ?? false) == true; (replace the request part with $request->post('adopted') or whatever is appropriate for you :)
Well, if you are passing a one or a zero just store it. Why bother validating it's going to be a 1 or a 0.
Basically if validating you are saying This has to be a 1 or 0. When it can only be a 1 or a 0 no matter what.
Again validating a tinyint is a mute point.
I disagree with this completely. Anyone can submit any value to the form, what if they submit an 11? For data consistency, I would ensure a 0 or 1 gets saved. So, not a moot point :)