Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Are you using jspm?
    I have only one folder of aurelia-validation in npm and one in jspm-packages/npm
    now I get this error: node_modules/aurelia-validation/dist/commonjs/property-info.d.ts(3,11): error TS2451: Cannot redeclare block-scoped variable 'getContextFor'.
    You still might get a duplicate module loaded. Check in the code if fluentrules object is the same in augmenting module and view model
    uuh, how can I check this?
    Ok, the problem above has nothing to do with adding the rule, it's something else with deprecating the aurelia-validation version in the node_modules to the same as in jspm-packages. I first need to fix this
    Ok, the code FluentRules is the one from node_modules, and the FluentRules Object in the view model is from JSPM. Since these are two different versions, this could cause the problem. Thanks for the hint
    I wonder how did you manage to load both of them...
    Not sure, it's an old project. Interessting fact, as soon as I adapt one of the two to the version of the other, the whole project breaks. I need to fix this and use the same version in node_modules and jspm-packages
    Module resolution picks the wrong module during patching, try specifying the path to the one in jspm

    Does aurelia-validation require that every "property" referred to in .ensure(...)is not null? I have the following piece of code

      editinfoChanged(newEditInfo: any, oldValue: any) : void {
        if (this.domainobject && newEditInfo) {
          this.editinfo.forEach((field: { requisiteness: string; name: string | number; label: string }) => {
            if (this.isMandatory(field.requisiteness)) {

    which fails and produces the following error message:

    Uncaught TypeError: Cannot read property 'toString' of null
        at PropertyAccessorParser.parse (aurelia-validation.js?f0d7:91)
        at FluentEnsure.ensure (aurelia-validation.js?f0d7:1700)
        at Function.ValidationRules.ensure (aurelia-validation.js?f0d7:1767)
        at eval (new-item-view.ts?c01b:112)
        at Array.forEach (<anonymous>)
        at NewItemView.editinfoChanged (new-item-view.ts?c01b:110)

    When I look at the value of this.domainobject[field.name](in the first iteration) it is null and this makes me wonder if that's the cause of the error?


    hello guys can someone help me with "form-field-validation" i'm trying to validate a checkbox table the validation works but the red border css not working

    in the noop.bind i passe the validated list

    <div class="box stackpanel vertical fit form-field-validation" noop.bind="posteUFDTOList & validate:validationController">
         <div class="box-header bg-primary stackpanel horizontal fit">
                <input id="chx_all" class="form-control colSelection" type="checkbox" change.delegate="cocherDecocherTout()" />
                 <label for="chx_all" class="box-title" i18n="sante:ui.fwm.gestionutilisateur.postes.postedetail.cocherdecocher"></label>
    if (this.posteUFDTOList) {
              this.validationController.validate({ object: this.posteUFDTOList });
    Radenko Zec
    I am getting this error on simple example email&validate' is not compatible with the validate binding-behavior.
    Is it possible to validate a form that's as a slot within a custom element? Example:
                <app-label label="Name" for="name" slot="label"></app-label>
                  value.two-way="model.name & validateOnBlur"
    don't see why not... validate binding behaviour should find the current controller anyway... is it not working for you?
    Khalil Mohammad Mirza


    I am a newbie in aurelia.

    Aurelia Validation Demo - Nested object properties
    BootstrapFormRenderer example

    I am getting correct validation when using controller.validate() method

    Problem is that in BootstrapFormRenderer

    In render method, elements are always empty.

      render(instruction: RenderInstruction) {
        for (let { result, elements } of instruction.unrender) {
          for (let element of elements) {
            this.remove(element, result);
        for (let { result, elements } of instruction.render) {
          for (let element of elements) {
            this.add(element, result);
    Khalil Mohammad Mirza
    I have got above working but now.
    Reset is not working.
    After clearing state and resetting validation.
    If I check validation again with an empty object.
    It succeeds.

    Hi all! I am new to aurelia and have the following problem - I would like to use accordion in one of my pages for FAQ.
    The accordion is working fine, however I would like to add show/hide function when someone is looking for a particular string and show the card with
    the particular information in it.
    I am doing that with jQuery, however I would like to do that with aurelia. Could you please give me some recommendation which would be the best way?

    Thank you!

    John Tomaselli
    I, failing on using validation with 2 controllers.
    I have a 2 tables and need separate validation controllers.
    My undestanding is that I can use ValidationControllerFactory multiple time.
    I can't seem to get this to work.
    TIA and Happy Thanksgiving
    constructor(EventAggregator, Router, AuthService, ApplicationService, ServiceApi, ValidationControllerFactory, DialogService){
        this.controller = ValidationControllerFactory.createForCurrentScope();
        this.controller.addRenderer(new AureliaUXFormRenderer());
        this.controllerWC = ValidationControllerFactory.createForCurrentScope();
        this.controllerWC.addRenderer(new AureliaUXFormRenderer());
      async attached() {
          .ensure('Date of Loss').required()
          .ensure('Claim Type').required()
    // this works!
        //  ValidationRules 
    // this fails
    html bind fails when i use
    <ux-input dense     variant.bind="variant" maxlength="2" value.bind="currentItem.InjuryType & validate:controllerWC " >
    John Tomaselli
    I have 2 gist's
    uses the code from aurelia multi controller documentation and works as documented
    this use ValidationControllerFactory to create mutiple instances and I finally got it to work!
    Hope this helps someone else.