Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 14 04:54
    quangquy87 opened #490
  • May 12 14:21
    ramu-erode commented #316
  • May 08 19:43
    dependabot[bot] labeled #489
  • May 08 19:43
    dependabot[bot] opened #489
  • May 08 19:43

    dependabot[bot] on npm_and_yarn

    chore(deps): bump ng-packagr in… (compare)

  • May 04 09:59
    Megingjard commented #480
  • Apr 30 13:27
    afzalmansuri commented #487
  • Apr 22 11:01
    piero1903 commented #460
  • Apr 21 10:06
    prince-developer-csharp commented #484
  • Apr 21 08:37
    afzalmansuri commented #487
  • Apr 21 07:55
    ajayojha commented #484
  • Apr 21 07:35
    ajayojha commented #488
  • Apr 21 07:33
    ajayojha closed #481
  • Apr 21 07:33
    ajayojha commented #487
  • Apr 21 07:32
    ajayojha commented #488
  • Apr 20 13:39
    rachanachag edited #488
  • Apr 20 13:38
    rachanachag opened #488
  • Apr 19 07:56
    afzalmansuri opened #487
  • Apr 16 02:07
    mineminemine opened #486
  • Apr 15 09:31
    Hesesses opened #485
Ajay Ojha
@ajayojha
which angular and reactive-form-validators version you are using?
Nils Wild
@NilsWild
angular 10.2.7 rxweb 2.1.2
sorry angular 10.1.0
Ajay Ojha
@ajayojha
ok
Ajay Ojha
@ajayojha
@NilsWild is it possible to share the package.json?
Nils Wild
@NilsWild
I think it's related to rxweb <-> storybook. If I open it up in the app I do not have that error
{
  "name": "cleared",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "nx": "nx",
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test",
    "lint": "nx workspace-lint && nx lint",
    "e2e": "nx e2e",
    "affected:apps": "nx affected:apps",
    "affected:libs": "nx affected:libs",
    "affected:build": "nx affected:build",
    "affected:e2e": "nx affected:e2e",
    "affected:test": "nx affected:test",
    "affected:lint": "nx affected:lint",
    "affected:dep-graph": "nx affected:dep-graph",
    "affected": "nx affected",
    "format": "nx format:write",
    "format:write": "nx format:write",
    "format:check": "nx format:check",
    "update": "nx migrate latest",
    "workspace-schematic": "nx workspace-schematic",
    "dep-graph": "nx dep-graph",
    "help": "nx help",
    "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
    "publish-pacts": "node publish-pacts.js"
  },
  "private": true,
  "dependencies": {
    "@angular-material-components/datetime-picker": "^4.0.5",
    "@angular/animations": "^10.2.3",
    "@angular/cdk": "^10.2.7",
    "@angular/common": "^10.1.0",
    "@angular/compiler": "^10.1.0",
    "@angular/core": "^10.1.0",
    "@angular/forms": "^10.1.0",
    "@angular/material": "^10.2.7",
    "@angular/platform-browser": "^10.1.0",
    "@angular/platform-browser-dynamic": "^10.1.0",
    "@angular/router": "^10.1.0",
    "@ngrx/component-store": "^10.0.1",
    "@rxweb/reactive-form-validators": "^2.1.2",
    "antlr4ts": "^0.5.0-alpha.3",
    "rxjs": "~6.5.5",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1001.3",
    "@angular/compiler-cli": "^10.1.0",
    "@angular/language-service": "^10.1.0",
    "@nrwl/angular": "^10.3.3",
    "@nrwl/cli": "10.3.3",
    "@nrwl/cypress": "10.3.3",
    "@nrwl/eslint-plugin-nx": "10.3.3",
    "@nrwl/jest": "10.3.3",
    "@nrwl/storybook": "^10.3.3",
    "@nrwl/workspace": "10.3.3",
    "@pact-foundation/pact": "9.13.0",
    "@storybook/addon-actions": "^6.0.28",
    "@storybook/addon-controls": "^6.0.28",
    "@storybook/angular": "^6.0.28",
    "@types/jest": "26.0.8",
    "@types/node": "~8.9.4",
    "@types/webpack": "4.41.21",
    "@typescript-eslint/eslint-plugin": "4.3.0",
    "@typescript-eslint/parser": "4.3.0",
    "antlr4ts-cli": "^0.5.0-alpha.3",
    "codelyzer": "~5.0.1",
    "cypress": "^4.1.0",
    "dotenv": "6.2.0",
    "eslint": "7.10.0",
    "eslint-config-prettier": "6.0.0",
    "jest": "26.2.2",
    "jest-preset-angular": "8.3.1",
    "prettier": "2.0.4",
    "ts-jest": "26.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~6.0.0",
    "typescript": "~4.0.3"
  }
}
Ajay Ojha
@ajayojha
Ok
Nils Wild
@NilsWild
@ajayojha after some more digging i found the problem: storybookjs/storybook#11379 storybookjs/storybook#11433
its an issue with storybook and Angular 10 ES 2015 bundles. Sorry that i didn't check the component in the real app first.
Nils Wild
@NilsWild
When using autoPushFormGroup https://docs.rxweb.io/how-to/autoPushFormGroup/decorators is there a clean way to reset the model?
rachanachag
@rachanachag
Hi @ajayojha, I want to use a conditional expression in Form group validation where I can set dynamic value for max length validation
e.g @maxLength({
conditionalExpression: x => x.validationMaxLength == "True",
value: x => x.validationMaxLengthNum
})

conditional expression is working fine in this case but I am not able to set value with ' x => x.validationMaxLengthNum'
Can you please help me this? Is there any other way ?
Xambey
@Xambey

hello, can you please tell me how you can make decorators work (for validation) if the component implements its ControlValueAccessor?

https://pastebin.com/hVbkVvdA

Inside the template, this component has a bootstrap datapicker, which changes its value depending on the value property. As far as I know, this datapicker inside also implements its own implementation of ControlValueAccessor, it looks like it stops being called when the formControlName is set for the parent component

UPD: I didn't notice that the controller doesn't seem to change its state to touched, after focusing, it looks like my mistake

Ushmidave
@Ushmidave
@rachanachag For on the fly validation based upon the dynamic value, you must pass the validation rules in dynamicConfig, please refer this example : https://stackblitz.com/angular/lroljoyaoba?file=src/app/bind-complete.component.ts
rachanachag
@rachanachag
@Ushmidave, I am using model-driven form and I want to set value for max length validation based upon value we get from database.
I have tried using the below code
@maxLength({
conditionalExpression: x => x.validationMaxLengthNumber > 0 ,
dynamicConfig: (x, y) => {
const maxlengthValue= x => x.validationMaxLengthNumber;
return {
value: maxlengthValue,
message: invalid
};
}
})
mitanshu-patel
@mitanshu-patel
Hello @ajayojha , can you please provide help regarding this ticket: rxweb/rxweb#444
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha , can you please have look into this ticket: rxweb/rxweb#451
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha, whenever I am running any architecture command from package manager console,getting this error "Newtonsoft.Json.JsonSerializationException: Unexpected end when deserializing object. Path 'CompanyCustomerMappings' " but not able to trace the issue
Ajay Ojha
@ajayojha
@Kiran-Pawar check the json files, there might me invalid json in the files
Kiran-Pawar
@Kiran-Pawar
ok let me check for it
Kiran-Pawar
@Kiran-Pawar
It is working fine now, thank you
stylishvinod
@stylishvinod
Hi Team, i am referring this link for disable formcontrol https://stackblitz.com/angular/bedxedgakrx?file=src%2Fapp%2Fdisable-add.component.ts, but in my case i have to use this param in formBuilder, so I am trying conditional disable like below, but it is not working. Can you please suggest. form = this.RxFormBuilder.group({ fielName: ['', RxwebValidators.disable({conditionalExpression: (x) => myCondition}]}).
stylishvinod
@stylishvinod
Hi Team, I am using @rxweb/reactive-form-validators package for conditional required validations and it is working fine for simple forms, when i started converting the form to nested form and have built nested forms with Angular reactive forms with CVAs(Controlled value accessors), Then conditional validations are not working. Please suggest am i missing some setup or any other things.
afzalmansuri
@afzalmansuri
Hello @ajayojha Sir, can you please look into this ticket: rxweb/rxweb#454
Ajay Ojha
@ajayojha
@afzalmansuri will be released today
afzalmansuri
@afzalmansuri
ok sir thanks for the update
afzalmansuri
@afzalmansuri
Hello @ajayojha Sir any update for the ticket: rxweb/rxweb#454
Ajay Ojha
@ajayojha
Sorry, @afzalmansuri, was a bit busy with other work, It will be released today.
freshdev1
@freshdev1
Hello everybody. I recently faced an issue which is something I would like anyone to help me understand....
My application was using NGX-translate and I replaced it with @rxweb translation extension
export function HttpLoaderFactory(http: HttpClient) {
  return  new  TranslateHttpLoader(http, './assets/i18n/', '.json');
}

TranslateModule.forRoot({
      defaultLanguage: 'en',
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      }
    }),
This was the configuration earlier.
freshdev1
@freshdev1
I looked at the guide on the website and removed all of this and changed it to:
TranslateModule.forRoot({
      globalFilePath: './assets/i18n/{{language-code}}.json',
now this used to work fine on local, but wouldn't work when deployed on my server.

then I loaded TranslateHttpLoader from @rxweb module and rewrote the above export function as:

export function HttpLoaderFactory(http: HttpClient) {
  return  new  TranslateHttpLoader(http);
}

It still failed. Since the application was hosted in a virtual directory:
ip-address/ATLP/abc/web

freshdev1
@freshdev1
Then I reimported the TranslateHttpLoader from ngx-translate this time passing it to TranslateModule of @rxweb extension. And everything started to work as expected.
import { TranslateModule, TranslateLoader } from "@rxweb/ngx-translate-extension";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";

export function HttpLoaderFactory(http: HttpClient) {
  return  new  TranslateHttpLoader(http, './assets/i18n/', '.json');
}

   TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      }
    }),
Can anyone tell me why this is an issue? I do not happen to understand the cause.
this is the final code i am having.
Ajay Ojha
@ajayojha
@freshdev1 I need to reproduce this in my local, then after will let you know. Overall it's doing the same thing without creating the custom loaderfactory.
Kiran-Pawar
@Kiran-Pawar
Hello @ajayojha can you please update me on this ticket - rxweb/rxweb#451
radixdt2020
@radixdt2020
Hi @ajayojha
I am referring to this command to add domain controller : rxwebcore --controller domain --main master --uow Master , but i am facing issue to add manually models , import files , add a interface for domain etc. Also when i am adding view model using command in Models , it's give me error of KeyLessEntity name space error which is already given name space for RxWeb.Core.Data.Annotations.
Ushmidave
@Ushmidave
@radixdt2020 which CLI version are you using ?
radixdt2020
@radixdt2020
CLI version is 9.1.7
radixdt2020
@radixdt2020
Do you asking me angular cli version or rxwebcore?
Ushmidave
@Ushmidave
rxwebcore cli
radixdt2020
@radixdt2020
How to check rxwebcore cli version?
Ushmidave
@Ushmidave
@radixdt2020 check this path there will be the installed package version number C:\Users\<username>.dotnet\tools.store\rxwebcore
radixdt2020
@radixdt2020
Package version is 1.2.2
Ushmidave
@Ushmidave
@radixdt2020 kindly install the version 1.1.6 and check the same
Nikunj V Kalathiya
@kalathiyan
is there any way to pass multiple values in start with Validator ?
like i need to validate string start with AA OR BB then how to do that ?
TutoDS
@tutods_twitter
Hi guys
image.png
I have this error when I try using Rxwebvalidators on my angular project