Skip to content

Commit

Permalink
Validations on api fields ar updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitwebkul committed Oct 12, 2023
1 parent 4db786d commit 82dae8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class HotelBranchInformation extends ObjectModel

//lang fields
'policies' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true),
'hotel_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true, 'validate' => 'isCatalogName'),
'hotel_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true, 'validate' => 'isGenericName'),
'description' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true),
'short_description' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'lang' => true),
), );
Expand Down Expand Up @@ -985,7 +985,7 @@ public function setWsHotelAddress()
}

$hotelName = $this->hotel_name[Configuration::get('PS_LANG_DEFAULT')];
$hotelName = preg_replace('/[0-9!<>,;?=+()@#"°{}_$%:]*$/u', '', $hotelName);
$hotelName = preg_replace('/[0-9!<>,;"?=+()@#°{}_$%:]*/u', '', $hotelName);

$objAddress->id_hotel = $this->id;
$objAddress->id_country = $this->id_country;
Expand Down

0 comments on commit 82dae8c

Please sign in to comment.