Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 16 02:07
    mineminemine opened #486
  • Apr 15 09:31
    Hesesses opened #485
  • Apr 12 12:13
    prince-developer-csharp opened #484
  • Apr 11 10:05
    Serene47 edited #483
  • Apr 11 10:05
    Serene47 edited #483
  • Apr 11 10:05
    Serene47 edited #483
  • Apr 11 10:04
    Serene47 edited #483
  • Apr 11 10:03
    Serene47 opened #483
  • Apr 09 06:21
    ajayojha commented #475
  • Apr 09 06:10
    Kiran-Pawar commented #475
  • Apr 09 06:09
    Kiran-Pawar commented #475
  • Apr 09 06:04
    Kiran-Pawar commented #475
  • Apr 08 07:41
    pritamgb edited #482
  • Apr 08 07:37
    pritamgb opened #482
  • Apr 02 07:36
    ajayojha closed #469
  • Apr 02 07:36
    ajayojha commented #469
  • Apr 02 04:51

    ajayojha on master

    fix : sorting function call mul… (compare)

  • Mar 30 07:25
    mitanshu-patel opened #481
  • Mar 24 10:22
    Jrubzjeknf opened #480
  • Mar 17 12:00
    Ushmidave commented #479
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
anyone can help me?
already try reinstall node_modules, but no success
I'm using Angular CLI: 11.0.5
TutoDS
@tutods_twitter
Anyone?
freshdev1
@freshdev1
@tutods_twitter I think last supported version is Angular 10 for RxWebValidators. Ajay will confirm.
freshdev1
@freshdev1

guys I am trying to implement RxWebValidators.... Following is my model class I'm using:

import { propObject, required } from '@rxweb/reactive-form-validators';
import { DocumentSubmission } from './document-submission.model';
import { TenantContractDetails } from './tenant-contract-details.model';
import { TenantContractGeneralInformation } from './tenant-contract-general-information.model';

export class TenantContract {
    @propObject(TenantContractGeneralInformation)
    BasicInformation: TenantContractGeneralInformation = new TenantContractGeneralInformation();

    @propObject(TenantContractDetails)
    TenantContractDetails: TenantContractDetails = new TenantContractDetails();

    @propObject(DocumentSubmission)
    TenantContractDocuments: DocumentSubmission = new DocumentSubmission();
}

FormGroups are created in the following way:

  createFormGroup(): void {
    this.contractForm = this.formBuilder.group(
      // {
      //   BasicInformation: this.formBuilder.formGroup(new TenantContractGeneralInformation()),
      //   TenantContractDetails: this.formBuilder.formGroup(new TenantContractDetails()),
      //   TenantContractDocuments: this.formBuilder.formGroup(new DocumentSubmission())
      // }
      new TenantContract()
    );
    console.log(this.contractForm);
  }
If I create formgroups this way none of the required or other errors are fired. If I create it the way which is commented out, all errors works as expected
Any ideas as to why this is happening.