people editor no match text - validation

I am creating one sharepoint webpart and it has one sharepoint people editor control. this is an required field. So i am using required field validator for validating the people editor control. But my problem is that when i am entering some junk data (eg: njhdfhfb), and then hit enter, it shows the validation message of "No exact match was found.". and also my validation message Select an employee or group. In my case i needs only my own validation message. But not the control message. How we can avoid this control validation message. Please help me for this. i had tried many ways.. but its not working. Thanks in advance..

In the above case the validator did not find any users and that is why it showed you the error message. You don't have to use a required field validator use AllowEmpty property and set its value to True.
You can disable to Validator using ValidatorEnabled property.

Related

Tabbed form and validation.

I'm creating a tabbed form with validation, and there is one thing I don't understand how to do: when I hit the submit button, and there is a validation error in some field, the form is not submitted - but if the field is in an hidden tab (a non focused one), there is no error message displayed either.
Is there am easy way to switch to the tab with errors, or to inhibith focusing on following tabs until all errors in current one had been cleared?
I'm new to all the React, JSX and modern JS development, please do not be too much concise! :)
Thanks!
I reproduced the problem and opened an issue on our repository. I'll let you know how it goes.
In the mean time, one way to mitigate this issue would be to create a custom saga. You'll need some knowledge about redux-saga though.
The idea would be to:
catch failed validations actions from redux-form (SET_SUBMIT_FAILED)
trigger a custom notification with an error message indicating the field and the tab where the error occurred. Unfortunately, you'll have to check the fields names to know for which resource the error occurred.

Xpages multiple file attachment conflict with partial/full update

I am using the multiple file attachment from openntf but it seems it's a problem when on the same page it is a validation on a field (a required field).
When I click the button to upload the files, I get the error message on the validation field.
Question: How can I have some kind of "Process data without validation" on the file uploader? How can I do this with Javascript?
You have two possibilities to upload files without getting validation error:
Don't include fields with validation into the partial refresh area set by xc:ynUploadFilesHTML5's parameter refreshID
Select "Process data without validation" in custom control ynUploadFilesHTML5's button "refresh"

showing error message from a custom validator or MVC3

i'm using this solution An ASP.NET MVC validator to make sure at least one checkbox is checked to have at least one checkbox checked on my form. But i can't figure out how to display the error message, in unobstrusive.
I suppose i should use a ValidationMessageFor with a custom script for the client side.

How to unlock a field of an entity in CRM Dynamics 4.0

I have an email entity, which contains a subject field which is locked. It's already unlocked in the property option. But still it's showing locked.
Welcome for any comment and suggestion.
on selection of a 'subject' attribute, I clicked on 'Change Property' and I found it;s already unlocked. Please help how to unlock this. see below
Some fields are required by the system and cannot be removed from the form. Ideally Microsoft should probably have set the field to locked and disabled the option.
It's because CRM excepts that always to be populated (how often do you send an email without a subject?).
There are a couple of fields like that in CRM, I'm guessing you are trying to hide it, probably easiest to accomplish with JavaScript.
Since this is a CRM 4 the syntax to do the hiding is somewhat different from CRM 2011 which nairware posted. In this blog you can see how to hide elements on a form.
Thanks for all of your support. I wanted to modify the subject field on email entity. Not to hide it any way. I have done it by exporting the email entity, modified the XML file by deleting Subject Cell () and then saved it. Then finally import the xml file in import customization and publish it.
If there is a red lock on the field, that is different from business required (the red star). The red lock on the field means you cannot do anything except leave that field on the form.
The workaround to address this situation is to create a hidden tab. All fields are presented within tabs. If you simply create one tab - label it as the "Hidden" tab - then you can throw all of the fields that you want to hide into that tab.
Use JavaScript to hide the tab:
document.getElementById("tab<tabNo>Tab").style.display = "none"; //CRM 4.0 syntax
or
Xrm.Page.ui.tabs.get("Hidden").setVisible(false); //CRM 2011 syntax

MVC 3 Client Side Validation Catches Some ValidationAttributes but not others?

I'm confused by this behavior:
I have an out-of-the-box MVC3 app. I haven't really done any customization from the what the scaffolding template gives me.
In web.config, clientsidevalidationenabled and unobtrusivevalidation are both true.
I have a class with one field using the Required annotation, one using StringLength and one using RegularExpression. When I'm editing an object, the textboxes for the properties marked with StringLength & Regex report problems instantly in the UI, but the textbox for the Required doesn't.
If I hit SAVE, then "Model.IsValid" is the controller sess the problem with the missing Required and I get the UI error message next to the text box.
If I view the source of the page, I can see that the markup for the required property does have the dataval-req and other related attributes generated by the Unobtrusive validation.
Is this expected behavior? If it is, what's the reason? If it's not, what might I be doing wrong?
Thanks! :)
As long as the page is not posting back to the server, this should be the correct behavior. The required client-validation will fire only if:
You don't enter data and try to post to the server.
You enter data in the text box and then remove it.
Otherwise the user would be inundated with error messages.
I've gotten to the bottom of this behavior, just by banging on the keyboard some more. It's as expected. In the Create view, the behavior is as #Beavis describes. In the edit view, unobtrusive validation prevents the required property from being validated on tabbing BEFORE the first attempt at hitting SAVE. SAVE then does a UI validation (no postback occurs) and shows the error message next to the property. Once I've hit save that first time, that property responds to tabbing. So now if I make it valid, the message disappears on tab. If I erase the contents of the text box, the message reappears on tab.
Thanks for everyone's help.

Resources