import {
  isUrl
} from "./chunk-YLD6I5ZW.mjs";

// src/sdk/dto/validators/is-url.validator.ts
import { registerDecorator } from "class-validator";
function IsUrl(validationOptions = {}) {
  return (object, propertyName) => {
    registerDecorator({
      propertyName,
      options: {
        message: `${propertyName} must be url`,
        ...validationOptions
      },
      name: "isUrl",
      target: object.constructor,
      constraints: [],
      validator: {
        validate(value) {
          return isUrl(value);
        }
      }
    });
  };
}

export {
  IsUrl
};
//# sourceMappingURL=chunk-M3D27F4Q.mjs.map