You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Variable is required but was not passed into the function.
631
-
if ($variable->required && ! $set) {
632
-
thrownewDisplayException('A required variable (' . $variable->env_variable . ') was not passed in the request.');
633
-
}
634
-
635
630
// If user is not an admin and are trying to edit a non-editable field
636
631
// or an invisible field just silently skip the variable.
637
632
if (! $admin && (! $variable->user_editable || ! $variable->user_viewable)) {
638
633
continue;
639
634
}
640
635
641
-
// Confirm value is valid when compared aganist regex.
642
-
// @TODO: switch to Laravel validation rules.
643
-
if ($set && ! is_null($variable->regex)) {
644
-
if (! preg_match($variable->regex, $data['env_' . $variable->id])) {
645
-
thrownewDisplayException('The value passed for a variable (' . $variable->env_variable . ') could not be matched aganist the regex for that field (' . $variable->regex . ').');
0 commit comments