Code Monkey home page Code Monkey logo

validations's Introduction

validations's People

Contributors

rhalff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

validations's Issues

Null safety?

Since the last dependency migrated to null safety several days ago, is there any plan to migrate violations library to null safety as well?

Add support for analyzer strong-mode

The generated code has errors if analysis_options.yaml is set with:

analyzer:
  strong-mode:
    implicit-casts: false
    implicit-dynamic: false

In generated code:

  @override
  PropertyMap<Driver> props(Driver instance) {
    return PropertyMap<Driver>({'name': instance.name});
  }

throws a Missing type arguments for map literal exception on the argument map.

Also:

  @override
  ClassValidator getClassValidator() {
    return ClassValidator<Car>(validators: [
      FieldMatchValidator(
          baseField: 'frontWheelCoverLeft', matchField: 'frontWheelCoverRight')
        ..affectedFields = ['frontWheelCoverLeft', 'frontWheelCoverRight']
        ..baseFieldMessage = carFieldMatchBaseFieldMessage,
      FieldMatchValidator(
          baseField: 'rearWheelCoverLeft', matchField: 'rearWheelCoverRight')
        ..affectedFields = ['rearWheelCoverLeft', 'rearWheelCoverRight']
        ..matchFieldMessage = carFieldMatchMatchFieldMessage
    ]);
  }

throws a Missing type arguments for generic type 'FieldMatchValidator' exception on FieldMatchValidator.

Docs

Please add more docs for doing the codegen.

Also in i18n aspects are really fantastic. Thanks

Optional validations

Hello, great work with the library. I was wondering whether you are planning to add support for optional attributes (similar to @IsOptional() in class-validator).

validations_generator: conflict with analyzer dependency

I tried to add this package to my Flutter app, but I have a conflict in my dev_dependencies when I run pub get:

Because validations_generator >=0.3.0 depends on analyzer ^0.36.0 and mobx_codegen 1.1.0 depends on analyzer >=0.38.5 <0.40.0, validations_generator >=0.3.0 is incompatible with mobx_codegen 1.1.0.

All my others dev_dependencies seem to depend on analyzer: ^0.39.0

I tried to set all dependencies to any, to let the pub’s version constraint solver find a combination that works, but it failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.