TYPO3 CMS V9: formframework validation problem with email addresse - typo3-9.x

Too often lately it happens that users are filling out the email input field of my forms and get an validation error because they copied a space sign in the end of the email address string. Mostly it is not transparent for them, why they get a validation error, and thus get angry and jump off. How can this situation be handled?
(1) How can the email address string be trimmed before validation?
(2) Or how can the validational algorithm be made insensitive for a trailing space sign?
I am using TYPO3 CMS V9 and the correspondant formframework extension.
Any suggestions?

Related

How to read RFC822 content as plain text?

First thing to note...I have tried a simple doc.computewithform(false,false) and it did not resolve this.
I have an agent set to run after new mail arrives. This agent will do different things depending on the email address it was sent to. Several email addresses are pointed to this mail-in db. So, in order for this to work, I need to read the 'sendto' field on the incoming email. Sometimes this value is plain text, and that works fine. Sometimes, depending on where the email was initiated, the sendto value is RFC822 text. I am hoping to find a way to convert this or extract from it the plain text representation of the sendto address.
I have a local memo form in this database that I could add an #Formula language function to, should one exist (so I could look there after the computewithform call).
If anyone has any ideas, I would be grateful for your input.
Matt
#Name([Abbreviate];SendTo) will extract the text from a field of RFC822 type 'Address'
or
The NotesName class in LotusScript can retrieve any part of a field of type 'RFC822 Text'

webcenter content field validation

How can we validate a custom field while checkin in to Oracle WebCenter Content?It may be an email validation or custom validation say the file will allow user to input only 10 chars of which first four are alpha and the next sixth char are numeric.
Regards,
Ananda Roy
Try adding a rule to the profile (or using global rule). Then, in the rule side effect, set this: <$xCustomField:maxLength=10$>
You can get fancier validation by doing more customization such as this.

EWS SearchFilter.ContainsSubstring to filter on Sender Email Address

I'm trying to filter emails on Exchange Web Services using SearchFilter.ContainsSubstring as follows:
sfilter = New SearchFilter.ContainsSubstring(EmailMessageSchema.Sender, EmailAddress, ContainmentMode.Substring, ComparisonMode.IgnoreCase)
MailItems = service.FindItems(Folder.Id, sfilter, view)
Unfortunately this doesn't work, and I don't want to use Queries, because I can't guarantee that I can use features of Exchange Server 2013.
Composing a variety of requests in Fiddler, I can observe that if I remove the last character of the email address, then the filter works, remove the first character instead, works - put them back, broken.
So perhaps it's pedantic, and it has to be a true substring to qualify, so if I change the Containment mode to FullString - it doesn't work, so I can't do anything like a collection with Substring OR FullString.
It looks like I'll be able to do (Substring with last char missing AND Substring with first char missing), but it surely can't be that broken can it?
What can I do to get this to work?
Note that my code is in VB.NET, but I can't imagine that this is the problem.
Cheers,
Mark
I worked out that the IsEqualTo filter works with From/Sender, and it doesn't care about case-sensitivity issues, so it's probably what I should have tried to begin with.
The code to match an email address is:
sfilter = New SearchFilter.IsEqualTo(EmailMessageSchema.From, New EmailAddress(Message.FromAddress))
MailItems = service.FindItems(FailureFolder.Id, sfilter, iv)
I still don't know how to find all emails from users at the same domain though.
More Info:
I really needed to filter by Sender Domain and did that by pulling the entire folder contents down and filtering in .Net code. Even that causes problems.
Basically to keep things quick and tight, I tried to pull all the data with a PropertySet:
New PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.Sender)
Filtering still didn't work, yet email addresses still showed in my list of items view. Well it turns out that the value of Message.Sender contains some kind of ActiveDirecty path in it until you call LoadPropertiesForItems. After LoadPropertiesForItems, it's an email address.
Note that my earlier attempt to filter at the server was scuppered because filtering would have to occur against the ActiveDirectory path style of string.
This is all highly confusing, and not at all user friendly.
If anybody has any idea on how to filter by email domain at the server, let me know!
Mark
What is your goal? Sender isn't a string property, so I'm not surprised that the results are odd with ContainsSubstring. I tried it against Office 365 and it worked, but older versions of Exchange may not be as "smart" about handling this kind of query. Depending on what you're trying to achieve, there may be a better filter.
if(emailSenderList.size() == 1) {
return new SearchFilter.IsEqualTo(EmailMessageSchema.From, emailSenderList.get(0));
}
return new SearchFilter.SearchFilterCollection(LogicalOperator.Or, emailSenderList.stream().map(em -> new SearchFilter.IsEqualTo(EmailMessageSchema.From, em)).toArray(SearchFilter.IsEqualTo[] :: new));

How does Password Managers (in browsers) detect user & password fields, and how to force this detection?

I'm trying to understand how does password managers to detect user & password field in forms.
I guess that the password field is detected by looking for a input[type="password"], and the user field is the direct previous input (hidden, text, email, etc...)
/***** EDITED ****/
Confirmed, for example:
I have two forms
F1= name,email,pass
F2= email,name,pass
So, I save my password in the first form, the PM saves "email" and "pass".
Then, the second form is filled with the value of email in the field name.
/***** END EDITED ****/
But this produces too many bugs, and these are very commons, even in some famous sites and frameworks.
There are some way to explicitly specific which fields should be saved?
I didnt find any info in internet.
I only find this propose: http://www.mypico.org/documents/2014-StajanoETAL-api.pdf but is not implemented yet (and maybe never)

How to change registration requirement for user ID in chat function

Hi when I run the sample chat function provided by quickblox, it contains several built-in limitation for username registration, for example, I need to have a certain number of characters or type of characters in order to register. I'm wondering which files contain those registration and display of error messages (I only found a class called "errors" in SignUpViewController ) and how do I change those limitations?
There are 2 ways:
Sign Up & then Sign In with email
Sign Up & then Sign In with login - Login field should contain alphanumeric and punctuation characters only
Is it OK? Or you have problem with other User's field?