Hi there! I'd love to have a way to do this:
$dotenv->notEmpty(['MY_FIRST_VAR', 'MY_SECOND_VAR']);
...with the same behavior as $dotenv->required.
The function is already there, but there doesn't seem to be a public API:
|
public function notEmpty() |
|
{ |
|
return $this->assertNullable( |
|
static function (string $value) { |
|
return Str::len(\trim($value)) > 0; |
|
}, |
|
'is empty' |
|
); |
|
} |
I'd submit a PR if you accept one :)
Hi there! I'd love to have a way to do this:
...with the same behavior as
$dotenv->required.The function is already there, but there doesn't seem to be a public API:
phpdotenv/src/Validator.php
Lines 68 to 76 in a59a137
I'd submit a PR if you accept one :)