{"version":3,"file":"validate_string.mjs","names":[],"sources":["../../src/validate/validate_string.ts"],"sourcesContent":["import {getType} from '../util/get_type';\nimport {ValidationError} from '../error/validation_error';\n\nexport function validateString(options) {\n    const value = options.value;\n    const key = options.key;\n    const type = getType(value);\n\n    if (type !== 'string') {\n        return [new ValidationError(key, value, `string expected, ${type} found`)];\n    }\n\n    return [];\n}\n"],"mappings":";;;AAGA,SAAgB,eAAe,SAAS;CACpC,MAAM,QAAQ,QAAQ;CACtB,MAAM,MAAM,QAAQ;CACpB,MAAM,OAAO,QAAQ,KAAK;CAE1B,IAAI,SAAS,UACT,OAAO,CAAC,IAAI,gBAAgB,KAAK,OAAO,oBAAoB,KAAK,OAAO,CAAC;CAG7E,OAAO,CAAC;AACZ"}