Added: Create new refuel record
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 14s

This commit is contained in:
2025-01-05 18:30:29 +01:00
parent 860a20d946
commit 3b0f672009
7 changed files with 158 additions and 19 deletions

View File

@@ -12,6 +12,15 @@ class Validator {
}
}
/**
* Check if a field contains numbers
*/
public function number($field, $value, $message = null) {
if(!is_numeric($value)) {
$this->errors[$field] = $message ?? "$field must be an number";
}
}
/**
* Check if a field meets minimum length
*/