Fix formatting
This commit is contained in:
parent
426fb87640
commit
238c22830b
1 changed files with 283 additions and 246 deletions
|
|
@ -50,8 +50,8 @@ export function formatFieldLabel(key: string): string {
|
|||
* @returns True if valid, false otherwise
|
||||
*/
|
||||
export function validateValueAgainstSchema(
|
||||
value: JsonValue,
|
||||
schema: JsonSchemaType
|
||||
value: JsonValue,
|
||||
schema: JsonSchemaType,
|
||||
): boolean {
|
||||
// Basic type validation
|
||||
switch (schema.type) {
|
||||
|
|
@ -65,7 +65,9 @@ export function validateValueAgainstSchema(
|
|||
case "array":
|
||||
return Array.isArray(value);
|
||||
case "object":
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
return (
|
||||
typeof value === "object" && value !== null && !Array.isArray(value)
|
||||
);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue