Required field in custom property dialog

50 views
Skip to first unread message

d.al...@astalegale.net

unread,
Feb 14, 2018, 10:45:37 AM2/14/18
to KalikoCMS Developer Forum
Hi Fredrik,

I'm experiencing some validation trouble when the required property is intended to be filled in a modal dialog as part of a CompositeProperty (when used in a CollectionProperty's item of that type to be more precise).

The required constraint is not triggered, and I can add an empty CompositeProperty item in the document

I'm using the version 1.2.4(beta3) KalikoCMS.Core

My code:

<code>
public class MyPage : CmsPage {

[Property("My Custom Property Name")]
public virtual CollectionProperty<MyCustomProperty> MyCustomPropertyName { get; set; }
....


[PropertyType("d9a7121c-8bb7-4c3a-8ae5-c3b71a96b215", "MyProperty", "MyProperty", EditorControl)]
public class MyCustomProperty : CompositeProperty
{
[Property("Mandatory Field")]
[Required]
public virtual StringProperty MandatoryField { get; set; }

[Property("Optional Field")]
public virtual StringProperty OptionalField { get; set; }


....
</code>


Is there something that I'm missing?

Thanks in advance,
Davide

Fredrik Schultz

unread,
Feb 14, 2018, 11:17:44 AM2/14/18
to KalikoCMS Developer Forum
Thanks for the sample code, I will look into it!

Best regards,
Fredrik

Fredrik Schultz

unread,
Feb 15, 2018, 4:39:39 PM2/15/18
to KalikoCMS Developer Forum
Hi,
Just a short update: I have located the problem and working on a fix. Expect a new version during next week that fixes the problem so that required attributes on properties within composites are handled correctly.

Best regards,
Fredrik

d.al...@astalegale.net

unread,
Feb 16, 2018, 3:39:39 AM2/16/18
to KalikoCMS Developer Forum
Thank you Fredrik! I'm glad to hear this news.

Best regards,
Davide

Fredrik Schultz

unread,
Feb 24, 2018, 8:28:39 AM2/24/18
to KalikoCMS Developer Forum
I've just uploaded a new pre-release that should fix this problem:

Best regards,
Fredrik

d.al...@astalegale.net

unread,
Feb 27, 2018, 4:37:44 AM2/27/18
to KalikoCMS Developer Forum
Thank you very much Fredrik!

best regards,
Davide

Reply all
Reply to author
Forward
0 new messages