"Module:Check isxn": अवतरणों में अंतर

Content deleted Content added
छो १ revision(s) from w:en:Module:Check_isxn: संबंधित साँचा आयात करने के लिए
सुधार
 
पंक्ति ५७:
isbn_str = isbn_str:gsub( "-", "" ):gsub( " ", "" ); -- remove hyphens and spaces
local len = isbn_str:len();
 
if len ~= 10 and len ~= 13 then
return error_string;
पंक्ति ६३:
 
if len == 10 then
if isbn_str:match( "^%d*X?$" ) == nil then
return error_string;
end
return is_valid_isxn(isbn_str, 10) and '' or error_string;
पंक्ति ७०:
local temp = 0;
if isbn_str:match( "^97[89]%d*$" ) == nil then -- isbn13 begins with 978 or 979; ismn begins with 979
return error_string;
end
return is_valid_isxn_13 (isbn_str) and '' or error_string;