Sonar cloud props validation issue

We are facing quite a weird issue regarding the props validation it appears that sonar cloud requires the core javascript functions to be properly validated. I would like to share an example code:

Suppose we have a Component which takes 2 inputs as a prop in react native

export const ExampleComponent = ({firstName, lastName}) => {
return (

in the above example it is a simple code component takes input and show output. and we understand if sonar wants to validated the inputs (props-validation). Like Below

ExampleComponent.propTypes = {
firstName: PropTypes.string,
lastName: PropTypes.string

This is fine but sonar cloud throw an error triggered by rule javascript:S6774, that firstName.trim is missed in props validation and lastName.trim is missed in props validation so i would like to know how to resolve this issue that we don’t need to validate the core javascript functions or anything like that. any help would be appreciated.

Here are some more details:

Which product(s) you’re using? Sonar Cloud

Which language you’re analyzing (and tag your post with the language!)? React-Native, Javascript

Which rule is affected? S:6774

Why you believe it’s a false-positive / false-negative? Because it asks to validate the js core functions and react native core functions.

Hey there.

Which rule is being triggered? Take a look at this post about how to report a false-positive:

Hi Colin, How are you? as you have seen this is a false positive issue, so how can we resolve this?

You’re going to have to follow-up on my last question.