ValuesManager validation error when no validator is specified

I’m seeing something that doesn’t make sense. I have 3 DForms bound together with a ValuesManager. ValuesManager.saveData() fails with:

WARN:validation:isc_ValuesManager_163:Validation failed with the following errors:
CREATION_DATE:- Invalid value

in the SmartClient console. There is no validation specified for CREATION_DATE in either the DataSource or ListGrid.

Due to this validation failure, the RPC call never occurs.

The exact same ListGrid and DataSource work correctly when tested as seperate DForms without the ValuesManager.

Is the ValuesManager doing any implicit validations on fields of type “date”?

Is the field marked “required:true” ?

No, it’s not marked as such.

One other note, the field CREATION_DATE is in the DS but not in the ListGrid.

In the datasource, if I change the type from “date” to “text”, everything works and there is no validation failure.

Not a showstopper, it just seemed odd.

I was not able to reproduce that error with the following code:

countryData = [

{
    continent:"North America",
    countryName:"United States",
    countryCode:"US",
    area:9631420,
    population:298444215,
    gdp:12360.0,
    independence:new Date(1776,6,4),
    government:"federal republic",
    government_desc:2,
    capital:"Washington, DC",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/United_states"
},
{
    continent:"Asia",
    countryName:"China",
    countryCode:"CH",
    area:9596960,
    population:1313973713,
    gdp:8859.0,
     independence:new Date(1828,7,4),
    government:"Communist state",
    government_desc:0,
    capital:"Beijing",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/China"
},
{
    continent:"Asia",
    countryName:"Japan",
    countryCode:"JA",
    area:377835,
    population:127463611,
    gdp:4018.0,
     independence:new Date(1923,8,4),
    government:"constitutional monarchy with parliamentary government",
    government_desc:1,
    capital:"Tokyo",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Japan"
}];

isc.DataSource.create({
    ID: "countryDS",
    fields:[
        {name:"countryName", title:"Country"},
        {name:"countryCode", title:"Code"},
        //{name:"independence", title:"Independence", type:"date"},
        {name:"population", title:"Population", type:"integer"},
        {name:"gdp", title:"GDP ($B)", type:"float"},
        {name:"capital"},
        {name:"continent"}
    ],
    clientOnly: true,
    testData: countryData
});

isc.ListGrid.create({
    ID: "countryList",
    width:600, height:224, alternateRecordStyles:true,
    rowClick: function () {
        vm.editRecord(this.getSelectedRecord());
    },
    dataSource: countryDS,
    autoFetchData: true
});

isc.ValuesManager.create({ ID:"vm", dataSource: countryDS});

isc.DynamicForm.create({
        ID: "form1",
        valuesManager: "vm",
        top:240,
        dataSource: countryDS,
        fields: [
            {name:"countryCode"},
            {name:"countryName"}
        ]        
});

isc.DynamicForm.create({
        ID: "form2",
        valuesManager: "vm",
        top:300,
        dataSource: countryDS,
        fields: [
            {name:"capital"},
            {name:"continent"}
        ]        
});

isc.DynamicForm.create({
        ID: "form3",
        valuesManager: "vm",
        top:380,
        dataSource: countryDS,
        fields: [
            {name:"gdp"},
            {name:"population"}
        ]        
});

isc.Button.create({
        top:450,
        title:"validate",
        click: "isc.say(vm.validate());"        
});

Is there any way you could reproduce this and post it here?

I just spent some time trying to reproduce the issue, and was not able to. I’ll update this post if I come across a reproducible test case.

Pete