<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RaushanSingh</title>
    <description>The latest articles on DEV Community by RaushanSingh (@raushan_singh).</description>
    <link>https://dev.to/raushan_singh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1223472%2F25e83b14-e09b-4449-88d8-c5132ebcdf8b.jpg</url>
      <title>DEV Community: RaushanSingh</title>
      <link>https://dev.to/raushan_singh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raushan_singh"/>
    <language>en</language>
    <item>
      <title>Spring Boot REST API Request Parameter Validation Issue With String data type ?</title>
      <dc:creator>RaushanSingh</dc:creator>
      <pubDate>Sat, 02 Dec 2023 09:58:05 +0000</pubDate>
      <link>https://dev.to/raushan_singh/spring-boot-rest-api-request-parameter-validation-issue-with-string-data-type--59nl</link>
      <guid>https://dev.to/raushan_singh/spring-boot-rest-api-request-parameter-validation-issue-with-string-data-type--59nl</guid>
      <description>&lt;p&gt;I need to validate my request parameter in rest API . I use a DTO class first I use requestbody and passing the String encrypted value (I encrypted my json request) then send through postman. latter I decrypt the requestData .&lt;br&gt;
Let us consider My Json request like :&lt;br&gt;
/&lt;em&gt;Json Request&lt;/em&gt;/&lt;br&gt;
{&lt;br&gt;
"firstName":"Raushan",&lt;br&gt;
"email":"&lt;a href="mailto:email12345@gmail.com"&gt;email12345@gmail.com&lt;/a&gt;",&lt;br&gt;
"age":"25",&lt;br&gt;
"salary":"89.90",&lt;br&gt;
"status":"1",&lt;br&gt;
}&lt;br&gt;
/*I send them postman like this */&lt;br&gt;
method:post: url : localhost:8056/addUser&lt;br&gt;
{&lt;br&gt;
"encryptedReq":"hjafbsfbgsyfyewf9903-jnjcnskdsd=/*ds7s412345/85*9665545"&lt;br&gt;
}&lt;br&gt;
I handle my controller this :&lt;br&gt;
public @ResponseBody ApiResponseDto addBeneficiar(@RequestBody String encryptedReq)&lt;br&gt;
Now I want that if i send some value is null then I want to return response with : "firstName value should not be null"&lt;br&gt;
so How can I do this &lt;a class="mentioned-user" href="https://dev.to/javathecup"&gt;@javathecup&lt;/a&gt; &lt;a class="mentioned-user" href="https://dev.to/javadmoradii"&gt;@javadmoradii&lt;/a&gt; &lt;a class="mentioned-user" href="https://dev.to/javadev16"&gt;@javadev16&lt;/a&gt; &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
